Package org.bitcoinj.base.internal
Interface FutureUtils.ThrowingSupplier<T>
-
- Type Parameters:
T- the supplied type
- All Superinterfaces:
java.util.function.Supplier<T>
- Enclosing class:
- FutureUtils
- 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 static interface FutureUtils.ThrowingSupplier<T> extends java.util.function.Supplier<T>Subinterface ofSupplierfor Lambdas which throw exceptions. Can be used for two purposes: 1. To cast a lambda that throws an exception to aSupplierand automatically wrapping any exceptions withRuntimeException. 2. As aFunctionalInterfacewhere a lambda that throws exceptions is expected or allowed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Tget()Gets a result wrapping checked Exceptions withRuntimeExceptionTgetThrows()Gets a result.
-
-
-
Method Detail
-
get
default T get()
Gets a result wrapping checked Exceptions withRuntimeException- Specified by:
getin interfacejava.util.function.Supplier<T>- Returns:
- a result
-
getThrows
T getThrows() throws java.lang.Exception
Gets a result.- Returns:
- a result
- Throws:
java.lang.Exception- Any checked Exception
-
-