Interface ThrowableFunctionalInterfaces.Supplier<T,X extends Exception>

  • Type Parameters:
    T - the type of results supplied by this supplier
    X - the type of exception to be thrown by the supplier
    Enclosing interface:
    ThrowableFunctionalInterfaces
    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 static interface ThrowableFunctionalInterfaces.Supplier<T,X extends Exception>
    Extended Supplier<T> functional interface which allows the get method to throw an exception of type X.
    • Method Detail

      • of

        static <T,X extends ExceptionThrowableFunctionalInterfaces.Supplier<T,X> of​(Supplier<T> supplier)
        Wraps the given supplier into a throwable supplier
        Type Parameters:
        T - the type of results supplied by this supplier
        X - the type of exception to be thrown by the supplier
        Parameters:
        supplier - The supplier to wrap
        Returns:
        The given supplier wrapped as a throwable supplier object
      • get

        T get()
        throws X extends Exception
        Gets a result.
        Returns:
        a result
        Throws:
        X - When an exception occurred during invocation
        X extends Exception