public class NOfFunction extends FunctionBase
This function evaluates the arguments one at a time, starting with the first one. As soon as the result of the function can be determined, evaluation stops and that result is returned. During this process, if any argument evaluates to indeterminate, an indeterminate result is returned.
Modifier and Type | Field and Description |
---|---|
static String |
NAME_N_OF
Standard identifier for the n-of function.
|
FUNCTION_NS, FUNCTION_NS_2
Constructor and Description |
---|
NOfFunction(String functionName)
Creates a new
NOfFunction object. |
Modifier and Type | Method and Description |
---|---|
void |
checkInputs(List inputs)
Default handling of input checking.
|
void |
checkInputsNoBag(List inputs)
Default handling of input checking.
|
EvaluationResult |
evaluate(List inputs,
EvaluationCtx context)
Evaluate the function, using the specified parameters.
|
static Set |
getSupportedIdentifiers()
Returns a
Set containing all the function identifiers
supported by this class. |
encode, encode, evalArgs, getFunctionId, getFunctionName, getIdentifier, getReturnType, getReturnTypeAsString, getType, makeProcessingError, returnsBag
public static final String NAME_N_OF
public NOfFunction(String functionName)
NOfFunction
object.functionName
- the standard XACML name of the function to be
handled by this object, including the full namespaceIllegalArgumentException
- if the function is unknownpublic static Set getSupportedIdentifiers()
Set
containing all the function identifiers
supported by this class.Set
of String
spublic EvaluationResult evaluate(List inputs, EvaluationCtx context)
inputs
- a List
of Evaluatable
objects representing the arguments passed to the functioncontext
- an EvaluationCtx
so that the
Evaluatable
objects can be evaluatedEvaluationResult
representing the
function's resultpublic void checkInputs(List inputs) throws IllegalArgumentException
FunctionBase
checkInputs
in interface Function
checkInputs
in class FunctionBase
inputs
- a List>
of Evaluatable
sIllegalArgumentException
- if the inputs won't workpublic void checkInputsNoBag(List inputs) throws IllegalArgumentException
FunctionBase
checkInputsNoBag
in interface Function
checkInputsNoBag
in class FunctionBase
inputs
- a List>
of Evaluatable
sIllegalArgumentException
- if the inputs won't workCopyright © 2023 JBoss by Red Hat. All rights reserved.