Class ResultTernaryExpression
- java.lang.Object
-
- org.vedantatree.expressionoasis.expressions.BinaryOperatorExpression
-
- org.vedantatree.expressionoasis.expressions.booleanexp.ResultTernaryExpression
-
- All Implemented Interfaces:
Expression
public class ResultTernaryExpression extends BinaryOperatorExpression
This expression manage the ':' operator of ternary expression, more specifically result part of the ternary operator.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.vedantatree.expressionoasis.expressions.BinaryOperatorExpression
BinaryOperatorExpression.TypePair
-
-
Field Summary
-
Fields inherited from class org.vedantatree.expressionoasis.expressions.BinaryOperatorExpression
leftOperandExpression, rightOperandExpression
-
-
Constructor Summary
Constructors Constructor Description ResultTernaryExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypegetReturnType()Gets the return type of the expression.ValueObjectgetValue()Executes and returns the value of this expression.protected voidvalidate(ExpressionContext expressionContext)Validates the expression.-
Methods inherited from class org.vedantatree.expressionoasis.expressions.BinaryOperatorExpression
accept, addTypePair, createTypePair, getLeftOperandExpression, getRightOperandExpression, initialize, toString, uninitialize
-
-
-
-
Method Detail
-
getReturnType
public Type getReturnType() throws ExpressionEngineException
Description copied from interface:ExpressionGets the return type of the expression.- Specified by:
getReturnTypein interfaceExpression- Overrides:
getReturnTypein classBinaryOperatorExpression- Returns:
- the type of expression
- Throws:
ExpressionEngineException- If there is any problem during execution- See Also:
Expression.getReturnType()
-
getValue
public ValueObject getValue() throws ExpressionEngineException
Description copied from interface:ExpressionExecutes and returns the value of this expression. If expression is not at node level, it will further evaluate its related expression which may represents operands or operators and return the final outcome.- Specified by:
getValuein interfaceExpression- Overrides:
getValuein classBinaryOperatorExpression- Returns:
- the value of expression (after expression evaluation)
- Throws:
ExpressionEngineException- if there is any problem during execution
-
validate
protected void validate(ExpressionContext expressionContext) throws ExpressionEngineException
Description copied from class:BinaryOperatorExpressionValidates the expression.- Overrides:
validatein classBinaryOperatorExpression- Throws:
ExpressionEngineException
-
-