Interface Func2<T1,​T2,​TRes,​TException extends Exception>

  • Type Parameters:
    T1 - the type of the first parameter of the encapsulated method.
    T2 - the type of the second parameter of the encapsulated method.
    TRes - the type of the return value of the encapsulated method.
    TException - the type of exception that might be thrown.

    public interface Func2<T1,​T2,​TRes,​TException extends Exception>
    Encapsulates a method that has two parameters and returns a value of the type specified by the TRes parameter.
    • Method Detail

      • invoke

        TRes invoke​(T1 arg1,
                    T2 arg2)
             throws TException extends Exception
        Invokes the method with the given parameters.
        Parameters:
        arg1 - the first parameter of the method.
        arg2 - the second parameter of the method.
        Returns:
        the return value of the method.
        Throws:
        TException - the exception the encapsulated method might throw.
        TException extends Exception