Interface ExpressionFactory.Factory

  • Enclosing class:
    ExpressionFactory
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    static interface ExpressionFactory.Factory
    • Method Detail

      • of

        static <T,​U> ExpressionFactory.Factory of​(java.lang.Class<T> type1,
                                                        java.lang.Class<U> type2,
                                                        java.util.function.BiFunction<T,​U,​?> function)
      • ofIterable

        static <T> ExpressionFactory.Factory ofIterable​(java.lang.Class<T> type,
                                                        java.util.function.Function<java.lang.Iterable<T>,​?> function)
        Create a factory that accepts an iterable (array or generic iterable)
        Type Parameters:
        T - The iterable type
        Parameters:
        type - The expected type class
        function - The function to apply the arguments to
        Returns:
        The result of the function call
      • ofEnv

        static <T> ExpressionFactory.Factory ofEnv​(java.lang.Class<T> type,
                                                   java.util.function.BiFunction<Environment,​T,​?> function)
        Create a ExpressionFactory.Factory for a function that takes a parameter
        Type Parameters:
        T - the type of the input to the function
        Parameters:
        type - The parameter type class
        function - The function to use when one argument is available
        Returns:
        The result of the function
      • ofEnv

        static <T,​U> ExpressionFactory.Factory ofEnv​(java.lang.Class<T> type1,
                                                           java.lang.Class<U> type2,
                                                           java.util.function.BiFunction<Environment,​T,​?> biFunction,
                                                           ExpressionFactory.TriFunction<Environment,​T,​U,​?> triFunction)
        Create a ExpressionFactory.Factory for an overloaded function
        Type Parameters:
        T - the type of the input to the function
        U - the type of the input to the function
        Parameters:
        type1 - The first parameter type class
        type2 - The second parameter type class
        biFunction - The function to use when one argument is available
        triFunction - The function to use when two arguments are available
        Returns:
        The result of one of the functions
      • ofEnv

        static <T,​U> ExpressionFactory.Factory ofEnv​(java.lang.Class<T> type1,
                                                           java.lang.Class<U> type2,
                                                           java.util.function.Function<Environment,​?> function,
                                                           java.util.function.BiFunction<Environment,​T,​?> biFunction,
                                                           ExpressionFactory.TriFunction<Environment,​T,​U,​?> triFunction)
        Create a ExpressionFactory.Factory for an overloaded function
        Type Parameters:
        T - the type of the input to the function
        U - the type of the input to the function
        Parameters:
        type1 - The first parameter type class
        type2 - The second parameter type class
        function - The function to use when no args are available
        biFunction - The function to use when one argument is available
        triFunction - The function to use when two arguments are available
        Returns:
        The result of one of the functions