public final class SumExpression extends UnaryOperatorExpression
(+) fold operation: All elements of the processed collection are
summed up, 0 is returned in case the collection is empty.SUM(collection).| Constructor and Description |
|---|
SumExpression() |
| Modifier and Type | Method and Description |
|---|---|
Expression |
getOperandExpression()
Gets the operand expression for this unary operator
|
Type |
getReturnType()
Gets the return type of the expression.
|
ValueObject |
getValue()
Evaluates the expression, that is, the corresponding fold operation is executed.
|
void |
initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate)
Initializes the operand expression.
|
accept, toString, uninitializepublic Type getReturnType()
ExpressiongetReturnType in interface ExpressiongetReturnType in class UnaryOperatorExpressionType.DOUBLE.Expression.getReturnType()public final ValueObject getValue() throws ExpressionEngineException
ValueObject of Type.DOUBLE that contains the result of the fold
operation.ExpressionEngineException - if there is any problem during executionpublic void initialize(ExpressionContext expressionContext, Object parameters, boolean validate) throws ExpressionEngineException
UnaryOperatorExpressioninitialize in interface Expressioninitialize in class UnaryOperatorExpressionexpressionContext - contextual information, may help in
initializationparameters - for example, sub expressions and identifiersAssertionError - In case the given expression context is not a CustomExpressionContext
instance.ExpressionEngineException - if there is any problem during executionorg.vedantatree.expressionoasis.expressions.Expression#initialize(org.vedantatree.expressionoasis.ExpressionContext,
java.lang.Object)public Expression getOperandExpression()
UnaryOperatorExpressiongetOperandExpression in class UnaryOperatorExpression