org.axiondb.functions
Class AverageFunction

java.lang.Object
  extended by org.axiondb.BaseSelectable
      extended by org.axiondb.functions.BaseFunction
          extended by org.axiondb.functions.BaseAggregateFunction
              extended by org.axiondb.functions.AverageFunction
All Implemented Interfaces:
Serializable, Function, FunctionFactory, AggregateFunction, ConcreteFunction, Selectable

public class AverageFunction
extends BaseAggregateFunction
implements AggregateFunction, FunctionFactory

Version:
$Revision: 1.6 $ $Date: 2005/05/02 22:28:41 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.axiondb.BaseSelectable
_hash
 
Constructor Summary
AverageFunction()
           
 
Method Summary
protected  BigDecimal evaluate(BigDecimal src, BigDecimal val)
           
 Object evaluate(RowDecoratorIterator rows)
           
 DataType getDataType()
           
 ConcreteFunction makeNewInstance()
           
 
Methods inherited from class org.axiondb.functions.BaseAggregateFunction
acceptable, evaluate, isDistinct, isValid, setDistinct, setDistinct
 
Methods inherited from class org.axiondb.functions.BaseFunction
addArgument, getArgument, getArgumentCount, setArgument, setVariableContext, toString
 
Methods inherited from class org.axiondb.BaseSelectable
getAlias, getLabel, getName, setAlias, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.axiondb.functions.ConcreteFunction
isValid
 
Methods inherited from interface org.axiondb.Function
addArgument, getAlias, getArgument, getArgumentCount, getName, setAlias, setArgument
 
Methods inherited from interface org.axiondb.Selectable
evaluate, getLabel, setVariableContext
 

Constructor Detail

AverageFunction

public AverageFunction()
Method Detail

makeNewInstance

public ConcreteFunction makeNewInstance()
Specified by:
makeNewInstance in interface FunctionFactory

getDataType

public final DataType getDataType()
Specified by:
getDataType in interface Selectable
Specified by:
getDataType in class BaseFunction

evaluate

public final Object evaluate(RowDecoratorIterator rows)
                      throws AxionException
Specified by:
evaluate in interface AggregateFunction
Throws:
AxionException

evaluate

protected BigDecimal evaluate(BigDecimal src,
                              BigDecimal val)