Interface IOSupplier<T>

  • Type Parameters:
    T - the supplied 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 IOSupplier<T>
    Supplier that can safely throws IOException.
    Since:
    4.0.0
    Author:
    Dmytro Nosan
    See Also:
    wrap(Supplier)
    • Method Detail

      • wrap

        static <T> IOSupplier<T> wrap​(Supplier<? extends T> supplier)
        Wrap a provided Supplier into IOSupplier.
        Type Parameters:
        T - the supplied type
        Parameters:
        supplier - the underlying supplier
        Returns:
        the new IOSupplier
      • get

        T get()
        throws IOException
        Gets the supplied value.
        Returns:
        the supplied value
        Throws:
        IOException - an I/O error occurs