Package io.reactivex.rxjava3.functions
Interface Supplier<T>
- Type Parameters:
T- the value type returned
- All Known Subinterfaces:
ScalarSupplier<T>
- All Known Implementing Classes:
ArrayListSupplier,FlowableEmpty,FlowableFromAction,FlowableFromCallable,FlowableFromRunnable,FlowableFromSupplier,FlowableJust,HashMapSupplier,MaybeEmpty,MaybeFromAction,MaybeFromCallable,MaybeFromRunnable,MaybeFromSupplier,MaybeJust,ObservableEmpty,ObservableFromAction,ObservableFromCallable,ObservableFromRunnable,ObservableFromSupplier,ObservableJust
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface (callback) that provides a single value or
throws an exception.
This interface was added to allow throwing any subclass of Throwables,
which is not directly possible with the Java standard Callable interface.
- Since:
- 3.0.0
-
Method Summary
-
Method Details
-
get
Produces a value or throws an exception.- Returns:
- the value produced
- Throws:
Throwable- if the implementation wishes to throw any type of exception
-