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
,FlowableInternalHelper.BufferedReplaySupplier
,FlowableInternalHelper.BufferedTimedReplay
,FlowableInternalHelper.ReplaySupplier
,FlowableInternalHelper.TimedReplay
,FlowableJust
,FlowableReplay.DefaultUnboundedFactory
,FlowableReplay.ReplayBufferSupplier
,FlowableReplay.ScheduledReplayBufferSupplier
,Functions.ArrayListCapacityCallable
,Functions.HashSetSupplier
,Functions.JustValue
,Functions.NullProvider
,HashMapSupplier
,MaybeEmpty
,MaybeFromAction
,MaybeFromCallable
,MaybeFromRunnable
,MaybeFromSupplier
,MaybeJust
,ObservableEmpty
,ObservableFromAction
,ObservableFromCallable
,ObservableFromRunnable
,ObservableFromSupplier
,ObservableInternalHelper.BufferedReplaySupplier
,ObservableInternalHelper.BufferedTimedReplaySupplier
,ObservableInternalHelper.ReplaySupplier
,ObservableInternalHelper.TimedReplayCallable
,ObservableJust
,Schedulers.ComputationTask
,Schedulers.IOTask
,Schedulers.NewThreadTask
,Schedulers.SingleTask
,SingleInternalHelper.NoSuchElementSupplier
- 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 interface Supplier<T>
A functional interface (callback) that provides a single value or throws an exception.This interface was added to allow throwing any subclass of
Throwable
s, which is not directly possible with the Java standardCallable
interface.- Since:
- 3.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
get()
Produces a value or throws an exception.
-
-
-
Method Detail
-
get
T get() throws java.lang.Throwable
Produces a value or throws an exception.- Returns:
- the value produced
- Throws:
java.lang.Throwable
- if the implementation wishes to throw any type of exception
-
-