Interface ExceptionalSupplier<T,E extends Throwable>

Type Parameters:
T - the return type of your choice
E - the exception of your choice
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 ExceptionalSupplier<T,E extends Throwable>
A generic functional interface that is more semantically sound than Runnable. Use anywhere you wish to have a generic callback function and you need to throw an exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    The supplier method
  • Method Details

    • get

      T get() throws E
      The supplier method
      Returns:
      the item to return
      Throws:
      E - the declared exception