org.objectweb.medor.filter.lib

Class Avg

Implemented Interfaces:
AggregateOperator, UnaryOperator

public class Avg
extends BasicAggregateOperator

Avg aggregate function.

Avg 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

Avg()
Avg(Expression e)
Avg(Expression e, boolean distinct)

Method Summary

Operand
compileExpression()
Operand
evaluate(ParameterOperand[] pos, Object o)
String
getOperatorString()

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

clone, getDistinct, setDistinct

Constructor Details

Avg

public Avg()


Avg

public Avg(Expression e)


Avg

public Avg(Expression e,
           boolean distinct)

Method Details

compileExpression

public Operand compileExpression()
            throws ExpressionException,
                   MalformedExpressionException


evaluate

public Operand evaluate(ParameterOperand[] pos,
                        Object o)
            throws ExpressionException


getOperatorString

public String getOperatorString()