Interface CheckedSupplier<T,E extends Throwable>

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,E extends Throwable>
A supplier that can throw checked exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <R> CheckedSupplier<R,E>
    andThen(CheckedFunction<? super T,? extends R,? extends E> mapper)
    Returns a new CheckedSupplier that maps the return value using mapper.
    get()
     
  • Method Details

    • get

      T get() throws E
      Throws:
      E
    • andThen

      default <R> CheckedSupplier<R,E> andThen(CheckedFunction<? super T,? extends R,? extends E> mapper)
      Returns a new CheckedSupplier that maps the return value using mapper. For example: (x -> 1).andThen(Object::toString).get() => "1".