Package bm.util
Interface SupplyOrThrow<V>
- 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 which may throw a
BuildProblemException.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceSupplyOrThrow.SoT<R,E extends Exception> A Supplier which may throw any type ofException. -
Method Summary
Modifier and TypeMethodDescriptionget()static <V,EX extends Exception>
SupplyOrThrowof(SupplyOrThrow.SoT<V, EX> sot) Creates a runnable to convert an arbitraryExceptionthrown to aBuildProblemException.
-
Method Details
-
get
- Throws:
BuildProblemException
-
of
Creates a runnable to convert an arbitraryExceptionthrown to aBuildProblemException.- Type Parameters:
EX- the exception type to wrap- Parameters:
sot- the consumer throwing an arbitrary exception- Returns:
- a consumer to only throw a
BuildProblemException
-