Package nz.org.riskscape.engine.function
Class IdentifiedFunction.Wrapping
java.lang.Object
nz.org.riskscape.engine.function.IdentifiedFunction.Wrapping
- All Implemented Interfaces:
AutoCloseable,IdentifiedFunction,RiskscapeFunction,UntypedFunction,Identified
- Enclosing interface:
- IdentifiedFunction
-
Nested Class Summary
Nested classes/interfaces inherited from interface nz.org.riskscape.engine.function.IdentifiedFunction
IdentifiedFunction.Category, IdentifiedFunction.Wrapping -
Field Summary
FieldsFields inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
BUILT_IN, LOG -
Constructor Summary
ConstructorsConstructorDescriptionWrapping(RiskscapeFunction wrapped, String id, String description, URI sourceURI, IdentifiedFunction.Category category) -
Method Summary
Modifier and TypeMethodDescriptionExecute the function with the given arguments.voidclose()getId()toString()validate(RealizationContext context) Validate that the function can be run.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.Identified
getIdentifiedClassMethods inherited from interface nz.org.riskscape.engine.function.IdentifiedFunction
getSource, infoOutput, isBuiltin, toEntityMethods inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
builtin, getTypesFromArguments, identified, identified, isA, setProblemReporter
-
Field Details
-
wrapped
-
-
Constructor Details
-
Wrapping
public Wrapping(RiskscapeFunction wrapped, String id, String description, URI sourceURI, IdentifiedFunction.Category category)
-
-
Method Details
-
call
Description copied from interface:UntypedFunctionExecute the function with the given arguments.
- Specified by:
callin interfaceUntypedFunction- Parameters:
args- list of arguments to the function that should conform to the types inArgumentList.getArgumentTypes()
-
getArgumentTypes
- Specified by:
getArgumentTypesin interfaceRiskscapeFunction- Returns:
- the types that this function expects
-
getArguments
- Specified by:
getArgumentsin interfaceRiskscapeFunction
-
getReturnType
- Specified by:
getReturnTypein interfaceRiskscapeFunction- Returns:
- the type that this function should return
-
getRealizable
- Specified by:
getRealizablein interfaceRiskscapeFunction- Returns:
- a
RealizableFunctionthat can realize thisRiskscapeFunctionagainst a type, or empty if this function does not support realization.
-
getOverloaded
- Specified by:
getOverloadedin interfaceRiskscapeFunction- Returns:
- an
OverloadedFunctionthat offers alternative input types for use within an expression, or empty if this function does not support overloading
-
getAggregationFunction
- Specified by:
getAggregationFunctionin interfaceRiskscapeFunction- Returns:
- An
AggregationFunctionthat is functionally the same operation as this, but works with aRealizedAggregateExpression, rather than against aRealizedExpressionwith anRSList.
-
validate
Description copied from interface:RiskscapeFunctionValidate that the function can be run.
To be considered valid there should be no
Problems found that are at error or fatal. Finding problems of lower severity should not make a function invalid.- Specified by:
validatein interfaceRiskscapeFunction- Returns:
- ResultOrProblems indicating if function is valid
-
toString
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRiskscapeFunction
-
getId
- Specified by:
getIdin interfaceIdentified- Returns:
- id
-
getDescription
- Specified by:
getDescriptionin interfaceIdentifiedFunction- Returns:
- a human readable description of the function
-
getSourceURI
- Specified by:
getSourceURIin interfaceIdentifiedFunction- Returns:
- a uri indicating the source of function. file/uri etc.
-
getCategory
- Specified by:
getCategoryin interfaceIdentifiedFunction- Returns:
- the category that this function belongs to
-