Class CastExpression

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

public class CastExpression extends ExpressionBase
Cast expression casts the return value of an expression to a specified type.
See Also:
  • Constructor Details

    • CastExpression

      public CastExpression()
      Ctor.
    • CastExpression

      public CastExpression(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, 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 Details

    • getPrecedence

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

      public void toPrecedenceFreeEPL(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 String getTypeName()
      Returns the name of the type to cast to.
      Returns:
      type name
    • setTypeName

      public void setTypeName(String typeName)
      Sets the name of the type to cast to.
      Parameters:
      typeName - is the name of type to cast to