Package org.storynode.pigeon.protocol
Interface ThrowingSupplier<T>
- Type Parameters:
T- The type of the supplied value
- 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.
A
Supplier that allows code to throw checked exceptions- Author:
- Andrea Coronese
-
Method Summary
Modifier and TypeMethodDescriptiondefault Tget()default Tget(BiFunction<String, Exception, RuntimeException> exceptionWrapper) get.Gets the supplied value, throwing any caught exception back to the caller
-
Method Details
-
getWithException
Gets the supplied value, throwing any caught exception back to the caller- Returns:
- The supplied value
- Throws:
Exception- if code completes exceptionally
-
get
-
get
get.- Parameters:
exceptionWrapper- aBiFunctionobject- Returns:
- a T object
-