org.jage.property.functions
Class MaxFunction
java.lang.Object
org.jage.property.Property
org.jage.property.functions.PropertyFunction
org.jage.property.functions.NumericFunction
org.jage.property.functions.MaxFunction
public class MaxFunction
- extends NumericFunction
Maximum property function.
- Author:
- Tomek
MaxFunction
public MaxFunction(String functionName,
String argumentsPattern,
double defaultValue)
- Constructor.
- Parameters:
functionName
- name of the function.argumentsPattern
- pattern for arguments.defaultValue
- default value of function, returned when no arguments are passed to it.
computeValue
protected Object computeValue(List<FunctionArgument> arguments)
throws InvalidFunctionArgumentException
- Computes function's value. It returns the greatest argument, or default value,
if not arguments were given.
- 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.