com.espertech.esper.client.soda
Class CastExpression

java.lang.Object
  extended by com.espertech.esper.client.soda.ExpressionBase
      extended by com.espertech.esper.client.soda.CastExpression
All Implemented Interfaces:
Expression, java.io.Serializable

public class CastExpression
extends ExpressionBase

Cast expression casts the return value of an expression to a specified type.

See Also:
Serialized Form

Constructor Summary
CastExpression()
          Ctor.
CastExpression(Expression expressionToCheck, java.lang.String typeName)
          Ctor.
CastExpression(java.lang.String typeName)
          Ctor - for use to create an expression tree, without child expression.
 
Method Summary
 ExpressionPrecedenceEnum getPrecedence()
          Returns precedence.
 java.lang.String getTypeName()
          Returns the name of the type to cast to.
 void setTypeName(java.lang.String typeName)
          Sets the name of the type to cast to.
 void toPrecedenceFreeEPL(java.io.StringWriter writer)
          Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.
 
Methods inherited from class com.espertech.esper.client.soda.ExpressionBase
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CastExpression

public CastExpression()
Ctor.


CastExpression

public CastExpression(java.lang.String typeName)
Ctor - for use to create an expression tree, without child expression.

Parameters:
typeName - is the type to cast to: a fully-qualified class name or Java primitive type name or "string"

CastExpression

public CastExpression(Expression expressionToCheck,
                      java.lang.String typeName)
Ctor.

Parameters:
expressionToCheck - provides values to cast
typeName - is the type to cast to: a fully-qualified class names or Java primitive type names or "string"
Method Detail

getPrecedence

public ExpressionPrecedenceEnum getPrecedence()
Description copied from interface: Expression
Returns precedence.

Returns:
precedence

toPrecedenceFreeEPL

public void toPrecedenceFreeEPL(java.io.StringWriter writer)
Description copied from class: ExpressionBase
Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.

Specified by:
toPrecedenceFreeEPL in class ExpressionBase
Parameters:
writer - is the output to use

getTypeName

public java.lang.String getTypeName()
Returns the name of the type to cast to.

Returns:
type name

setTypeName

public void setTypeName(java.lang.String typeName)
Sets the name of the type to cast to.

Parameters:
typeName - is the name of type to cast to

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com