Interface CheckedSupplier<T>

  • Type Parameters:
    T - the supplier return type
    All Superinterfaces:
    java.util.function.Supplier<T>
    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 CheckedSupplier<T>
    extends java.util.function.Supplier<T>
    A supplier interface that automatically wraps any exceptions.
    Author:
    Ramsey Gurley
    • Method Detail

      • get

        default T get()
        Specified by:
        get in interface java.util.function.Supplier<T>
      • gets

        T gets()
        throws java.lang.Exception
        Same as get except Exceptions may be thrown.
        Returns:
        the supplied object
        Throws:
        java.lang.Exception - an exception