Package nz.org.riskscape.engine.rl
Class Reduce
java.lang.Object
nz.org.riskscape.engine.function.BaseRealizableFunction
nz.org.riskscape.engine.rl.Reduce
- All Implemented Interfaces:
nz.org.riskscape.engine.rl.RealizableFunction
-
Nested Class Summary
Nested classes/interfaces inherited from interface nz.org.riskscape.engine.rl.RealizableFunction
nz.org.riskscape.engine.rl.RealizableFunction.MetadataIdentifiedRealizableFunction -
Field Summary
Fields inherited from class nz.org.riskscape.engine.function.BaseRealizableFunction
arguments, returnType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.engine.function.RiskscapeFunctionbuild(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> givenTypes) This method is internal to the sub-class.nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction>realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> givenTypes) Implements some basic boilerplate error checks by default.Methods inherited from class nz.org.riskscape.engine.function.BaseRealizableFunction
asFunction, buildFunction, builtin, getArguments, getReturnType, identifiedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.rl.RealizableFunction
isDoTypeAdaptation
-
Constructor Details
-
Reduce
public Reduce()
-
-
Method Details
-
realize
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction> realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> givenTypes) Description copied from class:BaseRealizableFunctionImplements some basic boilerplate error checks by default. This allows simple realizable functions to just define the
BaseRealizableFunction.build(RealizationContext, FunctionCall, List)guts of the function. More complicated realizable functions (i.e. with non-trivial type handling) may want to override this completely.- Specified by:
realizein interfacenz.org.riskscape.engine.rl.RealizableFunction- Overrides:
realizein classBaseRealizableFunction
-
build
public nz.org.riskscape.engine.function.RiskscapeFunction build(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> givenTypes) throws nz.org.riskscape.problem.ProblemException Description copied from class:BaseRealizableFunctionThis method is internal to the sub-class. Simple realizable functions can just implement this, to jump straight to the meat of building the realized function. You should throw a ProblemException for any errors encountered.
- Overrides:
buildin classBaseRealizableFunction- Throws:
nz.org.riskscape.problem.ProblemException
-