org.objectweb.medor.filter.lib

Class Sum

Implemented Interfaces:
AggregateOperator, UnaryOperator

public class Sum
extends BasicAggregateOperator

Sum aggregate function.

Sum applies to :

  1. a FieldOperand, which is part of a NestedField.
  2. a Collection of values (TupleCollection), specifying which Field is to be aggregated
  3. a Collection of values (Java Collection)

Author:
Alexandre Lefebvre

Field Summary

Fields inherited from class org.objectweb.medor.filter.lib.BasicAggregateOperator

distinct

Constructor Summary

Sum(Expression e)
Sum(Expression e, boolean distinct)

Method Summary

Operand
compileExpression()
org.objectweb.medor.expression.api.Operand
evaluate(ParameterOperand[] pos, Object o)
String
getOperatorString()

Methods inherited from class org.objectweb.medor.filter.lib.BasicAggregateOperator

clone, getDistinct, setDistinct

Constructor Details

Sum

public Sum(Expression e)


Sum

public Sum(Expression e,
           boolean distinct)

Method Details

compileExpression

public Operand compileExpression()
            throws ExpressionException,
                   MalformedExpressionException


evaluate

public org.objectweb.medor.expression.api.Operand evaluate(ParameterOperand[] pos,
                                                           Object o)
            throws ExpressionException


getOperatorString

public String getOperatorString()