Class SingleParameterTypedFirstOrderFunctionSignature<RETURN extends Value,​PARAM extends Value>

  • Type Parameters:
    RETURN - function's return type
    PARAM - common parameter type

    public class SingleParameterTypedFirstOrderFunctionSignature<RETURN extends Value,​PARAM extends Value>
    extends FirstOrderFunctionSignature<RETURN>
    First-order function signature having every parameter of the same datatype
    • Constructor Detail

      • SingleParameterTypedFirstOrderFunctionSignature

        public SingleParameterTypedFirstOrderFunctionSignature​(String name,
                                                               Datatype<RETURN> returnType,
                                                               boolean varArgs,
                                                               List<? extends Datatype<PARAM>> parameterTypes)
                                                        throws IllegalArgumentException
        Creates function signature
        Parameters:
        name - function name (e.g. XACML-defined URI)
        returnType - function's return type
        parameterTypes - function parameter types. Note: the "? extends" allows using BagDatatype as parameterType
        varArgs - true iff the function takes a variable number of arguments (like Java Method.isVarArgs(), i.e. the final type in paramTypes can be repeated 0 or more times to match a variable-length argument

        Examples with varargs=true ('...' means varargs like in Java):

        Example 1: string-concat(string, string, string...) -> paramTypes={string, string, string}

        Example 2: or(boolean...) -> paramTypes={boolean} (As you can see, isVarargs=true really means 0 or more args; indeed, the or function can take 0 parameter according to spec)

        Example 3: n-of(integer, boolean...) -> paramTypes={integer, boolean}

        Throws:
        IllegalArgumentException - if ( name == null || returnType == null || parameterTypes == null || parameterTypes.isEmpty())