org.pentaho.reporting.libraries.formula.function.information
Class ChooseFunction

java.lang.Object
  extended by org.pentaho.reporting.libraries.formula.function.information.ChooseFunction
All Implemented Interfaces:
Serializable, Function

public class ChooseFunction
extends Object
implements Function

This function uses an index to return a value from a list of values. The first value index is 1, 2 for the second and so on.

Author:
Cedric Pronzato
See Also:
Serialized Form

Constructor Summary
ChooseFunction()
           
 
Method Summary
 TypeValuePair evaluate(FormulaContext context, ParameterCallback parameters)
           
 String getCanonicalName()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChooseFunction

public ChooseFunction()
Method Detail

getCanonicalName

public String getCanonicalName()
Specified by:
getCanonicalName in interface Function

evaluate

public TypeValuePair evaluate(FormulaContext context,
                              ParameterCallback parameters)
                       throws EvaluationException
Specified by:
evaluate in interface Function
Throws:
EvaluationException