Package org.wildfly.clustering.function
Interface RuntimeExceptionSupplier<E extends RuntimeException>
- Type Parameters:
E- the exception type
- All Superinterfaces:
Supplier<E>
Supplies a runtime exception.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends RuntimeException>
RuntimeExceptionSupplier<E> of(E exception) Returns a supplier that always returns the specified exception.default <T> Supplier<T> Returns a supplier of an arbitrary type that throws the supplied exception.
-
Method Details
-
of
Returns a supplier that always returns the specified exception.- Type Parameters:
E- the exception type- Parameters:
exception- the supplied exception- Returns:
- a supplier that always returns the specified exception.
-
thenThrow
Returns a supplier of an arbitrary type that throws the supplied exception.- Type Parameters:
T- the supplied type, though never returned- Returns:
- a supplier of an arbitrary type that throws the supplied exception.
-