Interface CheckedSupplier<T>

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

    Modifier and Type
    Method
    Description
    default T
    get()
     
    Same as get except Exceptions may be thrown.
  • Method Details

    • get

      default T get()
      Specified by:
      get in interface Supplier<T>
    • gets

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