org.jage.property.functions
Class SumFunction
java.lang.Object
org.jage.property.Property
org.jage.property.functions.PropertyFunction
org.jage.property.functions.NumericFunction
org.jage.property.functions.SumFunction
public class SumFunction
- extends NumericFunction
Sum property function.
- Author:
- Tomek
SumFunction
public SumFunction(String functionName,
String argumentsPattern)
- Constructor.
- Parameters:
functionName
- name of the function.argumentsPattern
- pattern for arguments.
computeValue
protected Object computeValue(List<FunctionArgument> arguments)
throws InvalidFunctionArgumentException
- Computes function's value. It returns sum of all arguments.
- Specified by:
computeValue
in class PropertyFunction
- Parameters:
arguments
- arguments for the function.
- Returns:
- value of the function.
- Throws:
InvalidFunctionArgumentException
- one of arguments is not valid.
getReturnType
protected Class<?> getReturnType()
- Returns Double.class.
- Specified by:
getReturnType
in class PropertyFunction
- Returns:
- class for function's return value.
Copyright © 2006-2011 AGH University of Science and Technology. All Rights Reserved.