|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.query.function.aggregate.Sum
com.metamatrix.query.function.aggregate.Avg
public class Avg
Accumulates (per tuple) and calculates the average of the values
of a column. The type of the result varies depending on the type
of the input AggregateSymbol - the type will not be an
integral type but will always be some kind of decimal type.
| Field Summary |
|---|
| Fields inherited from class com.metamatrix.query.function.aggregate.Sum |
|---|
accumulatorType, BIG_DECIMAL, BIG_INTEGER, DOUBLE, LONG |
| Constructor Summary | |
|---|---|
Avg()
Constructor for Avg. |
|
| Method Summary | |
|---|---|
void |
addInput(java.lang.Object input)
Called for the element value in every row of a group. |
java.lang.Object |
getResult()
Called after all values have been processed to get the result. |
void |
initialize(java.lang.Class dataType)
Called to initialize the function. |
void |
reset()
Called to reset the state of the function. |
| Methods inherited from class com.metamatrix.query.function.aggregate.Sum |
|---|
getAccumulatorType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Avg()
| Method Detail |
|---|
public void initialize(java.lang.Class dataType)
AggregateFunction
initialize in interface AggregateFunctioninitialize in class SumdataType - Data type of element begin aggregatedcom.metamatrix.query.function.aggregate.AggregateFunction#initialize(String)public void reset()
AggregateFunction
reset in interface AggregateFunctionreset in class Sum
public void addInput(java.lang.Object input)
throws FunctionExecutionException,
ExpressionEvaluationException,
MetaMatrixComponentException
AggregateFunction
addInput in interface AggregateFunctionaddInput in class Suminput - Input value, may be null
FunctionExecutionException
ExpressionEvaluationException
MetaMatrixComponentExceptionAggregateFunction.addInput(Object)
public java.lang.Object getResult()
throws FunctionExecutionException,
ExpressionEvaluationException,
MetaMatrixComponentException
AggregateFunction
getResult in interface AggregateFunctiongetResult in class SumFunctionExecutionException
ExpressionEvaluationException
MetaMatrixComponentExceptionAggregateFunction.getResult()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||