Class CastExpression
java.lang.Object
com.espertech.esper.common.client.soda.ExpressionBase
com.espertech.esper.common.client.soda.CastExpression
- All Implemented Interfaces:
Expression
,Serializable
Cast expression casts the return value of an expression to a specified type.
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.CastExpression
(Expression expressionToCheck, String typeName) Ctor.CastExpression
(String typeName) Ctor - for use to create an expression tree, without child expression. -
Method Summary
Modifier and TypeMethodDescriptionReturns precedence.Returns the name of the type to cast to.void
setTypeName
(String typeName) Sets the name of the type to cast to.void
toPrecedenceFreeEPL
(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.common.client.soda.ExpressionBase
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
-
Constructor Details
-
CastExpression
public CastExpression()Ctor. -
CastExpression
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
Ctor.- Parameters:
expressionToCheck
- provides values to casttypeName
- is the type to cast to: a fully-qualified class names or Java primitive type names or "string"
-
-
Method Details
-
getPrecedence
Description copied from interface:Expression
Returns precedence.- Returns:
- precedence
-
toPrecedenceFreeEPL
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 classExpressionBase
- Parameters:
writer
- is the output to use
-
getTypeName
Returns the name of the type to cast to.- Returns:
- type name
-
setTypeName
Sets the name of the type to cast to.- Parameters:
typeName
- is the name of type to cast to
-