Interface FunctionWithException<I,​O,​E extends Throwable>

  • Type Parameters:
    I - the input type
    O - the output type
    E - the exception type (should extend from Throwable)
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface FunctionWithException<I,​O,​E extends Throwable>
    When a generic function is used, it can throw an exception. To materialize this principle, the FunctionWithException is designed. You can specify the input, output and exception types.