Interface FailableSupplier<T,E extends Throwable>
- Type Parameters:
T- Return type.E- The kind of thrown exception or error.
- All Known Subinterfaces:
ConcurrentInitializer<T>
- All Known Implementing Classes:
AbstractConcurrentInitializer,AbstractConcurrentInitializer.AbstractBuilder,AbstractSupplier,AtomicInitializer,AtomicInitializer.Builder,AtomicSafeInitializer,AtomicSafeInitializer.Builder,BackgroundInitializer,BackgroundInitializer.Builder,CallableBackgroundInitializer,ConstantInitializer,LazyInitializer,LazyInitializer.Builder,MultiBackgroundInitializer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
- Since:
- 3.11
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FailableSupplierReturns the singleton supplier that always returns null. -
Method Summary
Modifier and TypeMethodDescriptionget()Supplies an objectstatic <T,E extends Exception>
FailableSupplier<T, E> nul()Returns the singleton supplier that always returns null.
-
Field Details
-
NUL
Returns the singleton supplier that always returns null.This supplier never throws an exception.
- Since:
- 3.14.0
-
-
Method Details
-
nul
Returns the singleton supplier that always returns null.This supplier never throws an exception.
- Type Parameters:
T- Supplied type.E- The kind of thrown exception or error.- Returns:
- The NUL singleton.
- Since:
- 3.14.0
-
get
Supplies an object- Returns:
- a result
- Throws:
E- if the supplier fails
-