Class Coalesce.Definition
java.lang.Object
software.amazon.smithy.rulesengine.language.syntax.expressions.functions.Coalesce.Definition
- All Implemented Interfaces:
FunctionDefinition
- Enclosing class:
- Coalesce
A
FunctionDefinition
for the Coalesce
function.-
Method Summary
Modifier and TypeMethodDescriptioncreateFunction
(FunctionNode functionNode) Creates aLibraryFunction
implementation from the givenFunctionNode
.Evaluate the arguments to a given function to compute a result.The arguments to this function.getId()
The ID of this function.The return type of this function definition.Gets the type of variadic arguments if this function accepts them.
-
Method Details
-
getId
Description copied from interface:FunctionDefinition
The ID of this function.- Specified by:
getId
in interfaceFunctionDefinition
- Returns:
- The ID string
-
getArguments
Description copied from interface:FunctionDefinition
The arguments to this function.- Specified by:
getArguments
in interfaceFunctionDefinition
- Returns:
- The function arguments
-
getVariadicArguments
Description copied from interface:FunctionDefinition
Gets the type of variadic arguments if this function accepts them.When present, the function accepts any number of additional arguments of this type after the fixed arguments from getArguments().
- Specified by:
getVariadicArguments
in interfaceFunctionDefinition
- Returns:
- the variadic argument type, or empty if not variadic
-
getReturnType
Description copied from interface:FunctionDefinition
The return type of this function definition.- Specified by:
getReturnType
in interfaceFunctionDefinition
- Returns:
- The function return type
-
evaluate
Description copied from interface:FunctionDefinition
Evaluate the arguments to a given function to compute a result.- Specified by:
evaluate
in interfaceFunctionDefinition
- Returns:
- The resulting value
-
createFunction
Description copied from interface:FunctionDefinition
Creates aLibraryFunction
implementation from the givenFunctionNode
.- Specified by:
createFunction
in interfaceFunctionDefinition
- Parameters:
functionNode
- the function node to deserialize.- Returns:
- the created LibraryFunction implementation.
-