Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.pivot.table.aggregator
Class Functions.ScaledSumFunction

java.lang.Object
  extended by com.citra.pivot.table.aggregator.Functions.ScaledSumFunction
All Implemented Interfaces:
Functions.Function
Enclosing class:
Functions

public static class Functions.ScaledSumFunction
extends Object
implements Functions.Function

The scaled sum function.


Field Summary
protected  List weights
          the weights
 
Constructor Summary
Functions.ScaledSumFunction()
          Constructs a ScaledSumFunction.
Functions.ScaledSumFunction(List weights)
          Constructs a ScaledSumFunction.
 
Method Summary
 Object evaluate(List values, OlapType type)
          Produces an aggregate from a list of values.
 List getWeights()
          Retrieves the weights.
 void setWeights(List weights)
          Assigns a new set of weights.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

weights

protected List weights
the weights

Constructor Detail

Functions.ScaledSumFunction

public Functions.ScaledSumFunction()
Constructs a ScaledSumFunction.


Functions.ScaledSumFunction

public Functions.ScaledSumFunction(List weights)
Constructs a ScaledSumFunction.

Method Detail

setWeights

public void setWeights(List weights)
Assigns a new set of weights.

Parameters:
weights - the weights to assign

getWeights

public List getWeights()
Retrieves the weights.

Returns:
the weights

evaluate

public Object evaluate(List values,
                       OlapType type)
Produces an aggregate from a list of values.

Specified by:
evaluate in interface Functions.Function
Parameters:
values - the list of values
type - the data type the evaluation will be based on
Returns:
the aggregate value

Copyright © 2011 Citra Technologies. All Rights Reserved.