net.esper.eql.expression
Class ExprCastNode.TypeCaster

java.lang.Object
  extended by net.esper.eql.expression.ExprCastNode.TypeCaster
All Implemented Interfaces:
ExprCastNode.Caster
Enclosing class:
ExprCastNode

public class ExprCastNode.TypeCaster
extends Object
implements ExprCastNode.Caster

Cast implementation for non-numeric values.


Constructor Summary
ExprCastNode.TypeCaster(Class typeToCastTo)
          Ctor.
 
Method Summary
 Object cast(Object object)
          Casts an object to another type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExprCastNode.TypeCaster

public ExprCastNode.TypeCaster(Class typeToCastTo)
Ctor.

Parameters:
typeToCastTo - is the target type
Method Detail

cast

public Object cast(Object object)
Description copied from interface: ExprCastNode.Caster
Casts an object to another type.

Performs a compatibility check and returns null if not compatible.

Specified by:
cast in interface ExprCastNode.Caster
Parameters:
object - to cast
Returns:
casted or transformed object, possibly the same, or null if the cast cannot be made

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com