Package nz.org.riskscape.engine.function
Class ConstantFunction
java.lang.Object
nz.org.riskscape.engine.function.ConstantFunction
- All Implemented Interfaces:
AutoCloseable
,RiskscapeFunction
,UntypedFunction
A RiskscapeFunction that always returns the same value
-
Field Summary
Fields inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
BUILT_IN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionExecute the function with the given arguments.static ConstantFunction
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
builtin, getAggregationFunction, getArguments, getOverloaded, getRealizable, getTypesFromArguments, identified, identified, isA, setProblemReporter, validate
Methods inherited from interface nz.org.riskscape.engine.function.UntypedFunction
close
-
Constructor Details
-
ConstantFunction
-
-
Method Details
-
returning
-
call
Description copied from interface:UntypedFunction
Execute the function with the given arguments.
- Specified by:
call
in interfaceUntypedFunction
- Parameters:
args
- list of arguments to the function that should conform to the types inArgumentList.getArgumentTypes()
-
getArgumentTypes
- Specified by:
getArgumentTypes
in interfaceRiskscapeFunction
- Returns:
- the types that this function expects
-
getReturnType
- Specified by:
getReturnType
in interfaceRiskscapeFunction
- Returns:
- the type that this function should return
-