Class FirstOrderFunctionSignature<RETURN_T extends Value>

    • Field Detail

      • name

        protected final String name
      • isVarArgs

        protected final boolean isVarArgs
        Is the last parameter specified in paramTypes considered as variable-length (like Java Method.isVarArgs()), i.e. taking a variable number of arguments (0 or more) of the specified paramTypes[n-1] with n the size of paramTypes. In the following examples, '...' means varargs like in Java:

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

        Example 2: or(boolean...) -> paramTypes={boolean}, isVarargs=true (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}, isVarargs=true

        Example 4: abs(integer) -> paramTypes={integer}, isVarargs=false

        Example 5: string-equal(string, string) -> paramTypes={string, string}, isVarargs=false

        Example 6: date-add-yearMonthDuration(date, yearMonthDuration) -> paramTypes={date, yearMonthDuration}, isVarargs=false

    • Constructor Detail

      • FirstOrderFunctionSignature

        protected FirstOrderFunctionSignature​(String name,
                                              Datatype<RETURN_T> returnType,
                                              boolean varArgs)
                                       throws IllegalArgumentException
        Creates function signature
        Parameters:
        name - function name (e.g. XACML-defined URI)
        returnType - function's return type
        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 )
    • Method Detail

      • getName

        public String getName()
        Get function name
        Returns:
        function name
      • getReturnType

        public Datatype<RETURN_T> getReturnType()
        Get function return type
        Returns:
        function return type
      • isVarArgs

        public boolean isVarArgs()
        Returns true if this method was declared to take a variable number of arguments; returns false otherwise.
        Returns:
        true iff this method was declared to take a variable number of arguments.
      • getParameterTypes

        public abstract List<? extends Datatype<?>> getParameterTypes()
        Get function parameter types
        Returns:
        function parameter types