public class HigherOrderFunction extends Object implements Function
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME_ALL_OF
Standard identifier for the all-of function.
|
static String |
NAME_ALL_OF_ALL
Standard identifier for the all-of-all function.
|
static String |
NAME_ALL_OF_ANY
Standard identifier for the all-of-any function.
|
static String |
NAME_ANY_OF
Standard identifier for the any-of function.
|
static String |
NAME_ANY_OF_ALL
Standard identifier for the any-of-all function.
|
static String |
NAME_ANY_OF_ANY
Standard identifier for the any-of-any function.
|
| Constructor and Description |
|---|
HigherOrderFunction(String functionName)
Creates a new instance of the given function.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkInputs(List inputs)
Checks that the given inputs are valid for this function.
|
void |
checkInputsNoBag(List inputs)
Checks that the given inputs are valid for this function if all inputs are considered to not
be bags.
|
String |
encode()
Encodes this
HigherOrderFunction into its XML form |
void |
encode(StringBuilder builder)
Encodes this
HigherOrderFunction into its XML form and writes this out to the provided
StringBuilder |
EvaluationResult |
evaluate(List inputs,
EvaluationCtx context)
Evaluates the function, using the specified parameters.
|
URI |
getIdentifier()
Returns the full identifier of this function, as known by the factories.
|
URI |
getReturnType()
Returns the type of attribute value that will be returned by this function.
|
static Set |
getSupportedIdentifiers()
Returns a
Set containing all the function identifiers supported by this class. |
URI |
getType()
Returns the same value as
getReturnType. |
boolean |
returnsBag()
Returns whether or not this function will actually return a bag of values.
|
public static final String NAME_ANY_OF
public static final String NAME_ALL_OF
public static final String NAME_ANY_OF_ANY
public static final String NAME_ALL_OF_ANY
public static final String NAME_ANY_OF_ALL
public static final String NAME_ALL_OF_ALL
public HigherOrderFunction(String functionName)
functionName - the function to createIllegalArgumentException - if the function is unknownpublic static Set getSupportedIdentifiers()
Set containing all the function identifiers supported by this class.Set of Stringspublic URI getIdentifier()
getIdentifier in interface Functionpublic URI getType()
getReturnType. This is here to support the
Expression interface.getType in interface Expressionpublic URI getReturnType()
getReturnType in interface Functionpublic boolean returnsBag()
returnsBag in interface ExpressionreturnsBag in interface Functionpublic EvaluationResult evaluate(List inputs, EvaluationCtx context)
public void checkInputs(List inputs) throws IllegalArgumentException
checkInputs in interface Functioninputs - a List of EvaluatablesIllegalArgumentException - if the inputs are invalidpublic void checkInputsNoBag(List inputs) throws IllegalArgumentException
checkInputsNoBag in interface Functioninputs - a List of EvaluatablesIllegalArgumentException - alwayspublic String encode()
HigherOrderFunction into its XML formpublic void encode(StringBuilder builder)
HigherOrderFunction into its XML form and writes this out to the provided
StringBuilderencode in interface Expressionencode in interface Functionbuilder - string stream into which the XML-encoded data is writtenCopyright © 2018 WSO2. All rights reserved.