Interface ThrowingSupplier<T,E extends Throwable>

Type Parameters:
T - Type which will be returned by the get function of the supplier
E - Throwable type, which might be thrown by the provided code
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 ThrowingSupplier<T,E extends Throwable>
Simple functional supplier interface to be able to include code in the supplier, which throws predefined exceptions
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
     
    default Supplier<T>
    Transforms this Supplier into a regular Java lang Supplier, without having to worry about the exceptions, that might be thrown.
  • Method Details

    • get

      T get() throws E
      Throws:
      E extends Throwable
    • toSupplier

      default Supplier<T> toSupplier()
      Transforms this Supplier into a regular Java lang Supplier, without having to worry about the exceptions, that might be thrown.
      Returns:
      Supplier