java.lang.Object
com.espertech.esper.common.internal.epl.expression.core.ExprNodeBase
com.espertech.esper.common.internal.epl.expression.funcs.ExprCaseNode
All Implemented Interfaces:
ExprNode, ExprNodeRenderable, ExprValidator

public class ExprCaseNode extends ExprNodeBase
Represents the case-when-then-else control flow function is an expression tree.
  • Constructor Details

    • ExprCaseNode

      public ExprCaseNode(boolean isCase2)
      Ctor.
      Parameters:
      isCase2 - is an indicator of which Case statement we are working on.

      True indicates a 'Case2' statement with syntax "case a when a1 then b1 else b2".

      False indicates a 'Case1' statement with syntax "case when a=a1 then b1 else b2".

  • Method Details

    • getExprEvaluator

      public ExprEvaluator getExprEvaluator()
    • getForge

      public ExprForge getForge()
    • isCase2

      public boolean isCase2()
      Returns true if this is a switch-type case.
      Returns:
      true for switch-type case, or false for when-then type
    • validate

      public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException
      Throws:
      ExprValidationException
    • isConstantResult

      public boolean isConstantResult()
    • equalsNode

      public boolean equalsNode(ExprNode node, boolean ignoreStreamPrefix)
      Description copied from interface: ExprNode
      Return true if a expression node semantically equals the current node, or false if not.

      Concrete implementations should compare the type and any additional information that impact the evaluation of a node.

      Parameters:
      node - to compare to
      ignoreStreamPrefix - when the equals-comparison can ignore prefix of event properties
      Returns:
      true if semantically equal, or false if not equals
    • toPrecedenceFreeEPL

      public void toPrecedenceFreeEPL(StringWriter writer, ExprNodeRenderableFlags flags)
      Specified by:
      toPrecedenceFreeEPL in class ExprNodeBase
    • getPrecedence

      public ExprPrecedenceEnum getPrecedence()
      Description copied from interface: ExprNode
      Returns precedence.
      Returns:
      precedence