Interface FailableInterruptibleSupplier<T,​E extends Exception>

  • Type Parameters:
    T - The type of the data being returned
    E - The exception type
    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 FailableInterruptibleSupplier<T,​E extends Exception>
    A supplier that is interruptible and may also fail with a checked exception during the execution of the get() method.
    Author:
    Shai Barad
    • Method Detail

      • fromSupplier

        static <T,​E extends ExceptionFailableInterruptibleSupplier<T,​E> fromSupplier​(Supplier<T> supplier)
        Utility method for wrapping a supplier with a failable supplier
        Type Parameters:
        T - The type of the data being returned
        E - The exception type
        Parameters:
        supplier - The supplier to wrap
        Returns:
        The failable supplier (which effectively never throws checked exceptions)