Uses of Class
io.reactivex.rxjava3.core.Single
Packages that use Single
Package
Description
Base reactive classes:
Flowable
, Observable
,
Single
, Maybe
and
Completable
; base reactive consumers;
other common base interfaces.Contains the central plugin handler
RxJavaPlugins
class to hook into the lifecycle of the base reactive types and schedulers.Classes representing so-called hot sources, aka subjects, that implement a base reactive class and
the respective consumer type at once to allow forms of multicasting events to multiple
consumers as well as consuming another base reactive type of their kind.
-
Uses of Single in io.reactivex.rxjava3.core
Methods in io.reactivex.rxjava3.core that return SingleModifier and TypeMethodDescriptionRuns multipleSingleSource
s and signals the events of the first one that signals (disposing the rest).Single.ambArray
(@NonNull SingleSource<? extends @NonNull T>... sources) Runs multipleSingleSource
s and signals the events of the first one that signals (disposing the rest).Single.ambWith
(@NonNull SingleSource<? extends @NonNull T> other) Signals the event of this or the otherSingleSource
whichever signals first.Completable.andThen
(@NonNull SingleSource<@NonNull T> next) Returns aSingle
which will subscribe to thisCompletable
and once that is completed then will subscribe to thenext
SingleSource
.Returns aSingle
that emitstrue
if any item emitted by the currentFlowable
satisfies a specified condition, otherwisefalse
.Returns aSingle
that emitstrue
if any item emitted by the currentObservable
satisfies a specified condition, otherwisefalse
.Single.cache()
Stores the success value or exception from the currentSingle
and replays it to lateSingleObserver
s.Casts the success value of the currentSingle
into the target type or signals aClassCastException
if not compatible.Flowable.collect
(@NonNull Supplier<? extends @NonNull U> initialItemSupplier, @NonNull BiConsumer<? super @NonNull U, ? super @NonNull T> collector) Collects items emitted by the finite sourcePublisher
into a single mutable data structure and returns aSingle
that emits this structure.Observable.collect
(@NonNull Supplier<? extends @NonNull U> initialItemSupplier, @NonNull BiConsumer<? super @NonNull U, ? super @NonNull T> collector) Collects items emitted by the finite sourceObservable
into a single mutable data structure and returns aSingle
that emits this structure.Flowable.collectInto
(@NonNull U initialItem, @NonNull BiConsumer<? super @NonNull U, ? super @NonNull T> collector) Collects items emitted by the finite sourcePublisher
into a single mutable data structure and returns aSingle
that emits this structure.Observable.collectInto
(@NonNull U initialItem, @NonNull BiConsumer<? super @NonNull U, ? super @NonNull T> collector) Collects items emitted by the finite sourceObservable
into a single mutable data structure and returns aSingle
that emits this structure.Transform aSingle
by applying a particularSingleTransformer
function to it.Single.concatMap
(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Returns aSingle
that is based on applying a specified function to the item emitted by the currentSingle
, where that function returns aSingleSource
.Signalstrue
if the currentSingle
signals a success value that isObject.equals(Object)
with the value provided.Signalstrue
if the currentSingle
signals a success value that is equal with the value provided by calling aBiPredicate
.Flowable.count()
Maybe.count()
Observable.count()
Single.create
(@NonNull SingleOnSubscribe<@NonNull T> source) Provides an API (via a coldSingle
) that bridges the reactive world with the callback-style world.Maybe.defaultIfEmpty
(@NonNull T defaultItem) Returns aSingle
that emits the item emitted by the currentMaybe
or a specified default item if the currentMaybe
is empty.Calls aSupplier
for each individualSingleObserver
to return the actualSingleSource
to be subscribed to.Delays the emission of the success signal from the currentSingle
by the specified amount.Delays the emission of the success or error signal from the currentSingle
by the specified amount.Delays the emission of the success signal from the currentSingle
by the specified amount.Delays the emission of the success or error signal from the currentSingle
by the specified amount.Single.delaySubscription
(long time, @NonNull TimeUnit unit) Delays the actual subscription to the currentSingle
until the given time delay elapsed.Single.delaySubscription
(long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Delays the actual subscription to the currentSingle
until the given time delay elapsed.Single.delaySubscription
(@NonNull CompletableSource subscriptionIndicator) Delays the actual subscription to the currentSingle
until the given otherCompletableSource
completes.Single.delaySubscription
(@NonNull ObservableSource<@NonNull U> subscriptionIndicator) Delays the actual subscription to the currentSingle
until the given otherObservableSource
signals its first value or completes.Single.delaySubscription
(@NonNull SingleSource<@NonNull U> subscriptionIndicator) Delays the actual subscription to the currentSingle
until the given otherSingleSource
signals success.Single.delaySubscription
(@NonNull org.reactivestreams.Publisher<@NonNull U> subscriptionIndicator) Delays the actual subscription to the currentSingle
until the given otherPublisher
signals its first value or completes.Single.doAfterSuccess
(@NonNull Consumer<? super @NonNull T> onAfterSuccess) Calls the specified consumer with the success item after this item has been emitted to the downstream.Single.doAfterTerminate
(@NonNull Action onAfterTerminate) Calls the specified action after thisSingle
signalsonSuccess
oronError
or gets disposed by the downstream.Single.doOnDispose
(@NonNull Action onDispose) Calls the sharedAction
if aSingleObserver
subscribed to the currentSingle
disposes the commonDisposable
it received viaonSubscribe
.Calls the shared consumer with the error sent viaonError
for eachSingleObserver
that subscribes to the currentSingle
.Single.doOnEvent
(@NonNull BiConsumer<@Nullable ? super @NonNull T, @Nullable ? super Throwable> onEvent) Calls the shared consumer with the error sent viaonError
or the value viaonSuccess
for eachSingleObserver
that subscribes to the currentSingle
.Single.doOnLifecycle
(@NonNull Consumer<? super Disposable> onSubscribe, @NonNull Action onDispose) Calls the appropriateonXXX
method (shared between allSingleObserver
s) for the lifecycle events of the sequence (subscription, disposal).Single.doOnSubscribe
(@NonNull Consumer<? super Disposable> onSubscribe) Calls the shared consumer with theDisposable
sent through theonSubscribe
for eachSingleObserver
that subscribes to the currentSingle
.Single.doOnSuccess
(@NonNull Consumer<? super @NonNull T> onSuccess) Calls the shared consumer with the success value sent viaonSuccess
for eachSingleObserver
that subscribes to the currentSingle
.Single.doOnTerminate
(@NonNull Action onTerminate) Returns aSingle
instance that calls the givenonTerminate
callback just before thisSingle
completes normally or with an exception.Returns aSingle
that emits the item found at a specified index in a sequence of emissions from thisFlowable
, or a default item if that index is out of range.Returns aSingle
that emits the item found at a specified index in a sequence of emissions from the currentObservable
, or a default item if that index is out of range.Flowable.elementAtOrError
(long index) Returns aSingle
that emits the item found at a specified index in a sequence of emissions from thisFlowable
or signals aNoSuchElementException
if thisFlowable
has fewer elements than index.Observable.elementAtOrError
(long index) Returns aSingle
that emits the item found at a specified index in a sequence of emissions from the currentObservable
or signals aNoSuchElementException
if the currentObservable
signals fewer elements than index.Signals aThrowable
returned by the callback function for each individualSingleObserver
.Returns aSingle
that invokes a subscriber'sonError
method when the subscriber subscribes to it.Returns aSingle
that emits only the very first item emitted by thisFlowable
, or a default item if thisFlowable
completes without emitting anything.Returns aSingle
that emits only the very first item emitted by the currentObservable
, or a default item if the currentObservable
completes without emitting any items.Flowable.firstOrError()
Returns aSingle
that emits only the very first item emitted by thisFlowable
or signals aNoSuchElementException
if thisFlowable
is empty.Observable.firstOrError()
Returns aSingle
that emits only the very first item emitted by the currentObservable
or signals aNoSuchElementException
if the currentObservable
is empty.Single.flatMap
(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Returns aSingle
that is based on applying a specified function to the item emitted by the currentSingle
, where that function returns aSingleSource
.Single.flatMap
(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> onSuccessMapper, @NonNull Function<? super Throwable, ? extends SingleSource<? extends @NonNull R>> onErrorMapper) Maps theonSuccess
oronError
signals of the currentSingle
into aSingleSource
and emits thatSingleSource
's signals.Single.flatMap
(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull U>> mapper, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> combiner) Returns aSingle
that emits the results of a specified function to the pair of values emitted by the currentSingle
and a specified mappedSingleSource
.Single.fromCallable
(@NonNull Callable<? extends @NonNull T> callable) Returns aSingle
that invokes the givenCallable
for each incomingSingleObserver
and emits its value or exception to them.Single.fromCompletionStage
(@NonNull CompletionStage<@NonNull T> stage) Signals the completion value or error of the given (hot)CompletionStage
-based asynchronous calculation.Single.fromFuture
(@NonNull Future<? extends @NonNull T> future) Converts aFuture
into aSingle
and awaits its outcome in a blocking fashion.Single.fromFuture
(@NonNull Future<? extends @NonNull T> future, long timeout, @NonNull TimeUnit unit) Converts aFuture
into aSingle
and awaits its outcome, or timeout, in a blocking fashion.Single.fromMaybe
(@NonNull MaybeSource<@NonNull T> maybe) Returns aSingle
instance that when subscribed to, subscribes to theMaybeSource
instance and emitsonSuccess
as a single item, turns anonComplete
intoNoSuchElementException
error signal or forwards theonError
signal.Single.fromMaybe
(@NonNull MaybeSource<@NonNull T> maybe, @NonNull T defaultItem) Returns aSingle
instance that when subscribed to, subscribes to theMaybeSource
instance and emitsonSuccess
as a single item, emits thedefaultItem
for anonComplete
signal or forwards theonError
signal.Single.fromObservable
(@NonNull ObservableSource<? extends @NonNull T> observable) Wraps a specificObservableSource
into aSingle
and signals its single element or error.Single.fromPublisher
(@NonNull org.reactivestreams.Publisher<? extends @NonNull T> publisher) Wraps a specificPublisher
into aSingle
and signals its single element or error.Single.fromSupplier
(@NonNull Supplier<? extends @NonNull T> supplier) Returns aSingle
that invokes passed supplier and emits its result for each individualSingleObserver
that subscribes.Single.hide()
Hides the identity of the currentSingle
, including theDisposable
that is sent to the downstream viaonSubscribe()
.Flowable.isEmpty()
Maybe.isEmpty()
Observable.isEmpty()
Returns aSingle
that emits a specified item.Returns aSingle
that emits only the last item emitted by thisFlowable
, or a default item if thisFlowable
completes without emitting any items.Returns aSingle
that emits only the last item emitted by the currentObservable
, or a default item if the currentObservable
completes without emitting any items.Flowable.lastOrError()
Returns aSingle
that emits only the last item emitted by thisFlowable
or signals aNoSuchElementException
if thisFlowable
is empty.Observable.lastOrError()
Returns aSingle
that emits only the last item emitted by the currentObservable
or signals aNoSuchElementException
if the currentObservable
is empty.This method requires advanced knowledge about building operators, please consider other standard composition methods first; Returns aSingle
which, when subscribed to, invokes theapply(SingleObserver)
method of the providedSingleOperator
for each individual downstreamSingle
and allows the insertion of a custom operator by accessing the downstream'sSingleObserver
during this subscription phase and providing a newSingleObserver
, containing the custom operator's intended business logic, that will be used in the subscription process going further upstream.Returns aSingle
that applies a specified function to the item emitted by the currentSingle
and emits the result of this function application.final <@NonNull T>
@NonNull Single<Notification<T>> Completable.materialize()
Maps the signal types of thisCompletable
into aNotification
of the same kind and emits it as a single success value to downstream.final @NonNull Single
<Notification<T>> Maybe.materialize()
Maps the signal types of thisMaybe
into aNotification
of the same kind and emits it as aSingle
'sonSuccess
value to downstream.final @NonNull Single
<Notification<T>> Single.materialize()
Maps the signal types of thisSingle
into aNotification
of the same kind and emits it as a single success value to downstream.Single.merge
(@NonNull SingleSource<? extends SingleSource<? extends @NonNull T>> source) Flattens aSingleSource
that emits aSingleSingle
into a singleSingle
that emits the item emitted by the nestedSingleSource
, without any transformation.Single.never()
Returns a singleton instance of a never-signalingSingle
(only callsonSubscribe
).Signals the success item or the terminal signals of the currentSingle
on the specifiedScheduler
, asynchronously.Single.onErrorResumeNext
(@NonNull Function<? super Throwable, ? extends SingleSource<? extends @NonNull T>> fallbackSupplier) Resumes the flow with aSingleSource
returned for the failureThrowable
of the currentSingle
by a function instead of signaling the error viaonError
.Single.onErrorResumeWith
(@NonNull SingleSource<? extends @NonNull T> fallback) Resumes the flow with the givenSingleSource
when the currentSingle
fails instead of signaling the error viaonError
.Ends the flow with a success item returned by a function for theThrowable
error signaled by the currentSingle
instead of signaling the error viaonError
.Single.onErrorReturnItem
(@NonNull T item) Signals the specified value as success in case the currentSingle
signals an error.Single.onTerminateDetach()
Nulls out references to the upstream producer and downstreamSingleObserver
if the sequence is terminated or downstream callsdispose()
.Flowable.reduce
(@NonNull R seed, @NonNull BiFunction<@NonNull R, ? super @NonNull T, @NonNull R> reducer) Returns aSingle
that applies a specified accumulator function to the first item emitted by the currentFlowable
and a specified seed value, then feeds the result of that function along with the second item emitted by the currentFlowable
into the same function, and so on until all items have been emitted by the current and finiteFlowable
, emitting the final result from the final call to your function as its sole item.Observable.reduce
(@NonNull R seed, @NonNull BiFunction<@NonNull R, ? super @NonNull T, @NonNull R> reducer) Returns aSingle
that applies a specified accumulator function to the first item emitted by the currentObservable
and a specified seed value, then feeds the result of that function along with the second item emitted by the currentObservable
into the same function, and so on until all items have been emitted by the current and finiteObservable
, emitting the final result from the final call to your function as its sole item.Flowable.reduceWith
(@NonNull Supplier<@NonNull R> seedSupplier, @NonNull BiFunction<@NonNull R, ? super @NonNull T, @NonNull R> reducer) Returns aSingle
that applies a specified accumulator function to the first item emitted by the currentFlowable
and a seed value derived from calling a specifiedseedSupplier
, then feeds the result of that function along with the second item emitted by the currentFlowable
into the same function, and so on until all items have been emitted by the current and finiteFlowable
, emitting the final result from the final call to your function as its sole item.Observable.reduceWith
(@NonNull Supplier<@NonNull R> seedSupplier, @NonNull BiFunction<@NonNull R, ? super @NonNull T, @NonNull R> reducer) Returns aSingle
that applies a specified accumulator function to the first item emitted by the currentObservable
and a seed value derived from calling a specifiedseedSupplier
, then feeds the result of that function along with the second item emitted by the currentObservable
into the same function, and so on until all items have been emitted by the current and finiteObservable
, emitting the final result from the final call to your function as its sole item.Single.retry()
Repeatedly re-subscribes to the currentSingle
indefinitely if it fails with anonError
.Single.retry
(long times) Repeatedly re-subscribe at most the specified times to the currentSingle
if it fails with anonError
.Repeatedly re-subscribe at most times or until the predicate returnsfalse
, whichever happens first if it fails with anonError
.Single.retry
(@NonNull BiPredicate<? super Integer, ? super Throwable> predicate) Re-subscribe to the currentSingle
if the given predicate returnstrue
when theSingle
fails with anonError
.Re-subscribe to the currentSingle
if the given predicate returnstrue
when theSingle
fails with anonError
.Single.retryUntil
(@NonNull BooleanSupplier stop) Retries until the given stop function returnstrue
.Single.retryWhen
(@NonNull Function<? super Flowable<Throwable>, @NonNull ? extends org.reactivestreams.Publisher<@NonNull ?>> handler) Re-subscribes to the currentSingle
if and when thePublisher
returned by the handler function signals a value.Completable.sequenceEqual
(@NonNull CompletableSource source1, @NonNull CompletableSource source2) Flowable.sequenceEqual
(@NonNull org.reactivestreams.Publisher<? extends @NonNull T> source1, @NonNull org.reactivestreams.Publisher<? extends @NonNull T> source2) Flowable.sequenceEqual
(@NonNull org.reactivestreams.Publisher<? extends @NonNull T> source1, @NonNull org.reactivestreams.Publisher<? extends @NonNull T> source2, int bufferSize) Flowable.sequenceEqual
(@NonNull org.reactivestreams.Publisher<? extends @NonNull T> source1, @NonNull org.reactivestreams.Publisher<? extends @NonNull T> source2, @NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> isEqual) Flowable.sequenceEqual
(@NonNull org.reactivestreams.Publisher<? extends @NonNull T> source1, @NonNull org.reactivestreams.Publisher<? extends @NonNull T> source2, @NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> isEqual, int bufferSize) Maybe.sequenceEqual
(@NonNull MaybeSource<? extends @NonNull T> source1, @NonNull MaybeSource<? extends @NonNull T> source2) Returns aSingle
that emits aBoolean
value that indicates whether twoMaybeSource
sequences are the same by comparing the items emitted by eachMaybeSource
pairwise.Maybe.sequenceEqual
(@NonNull MaybeSource<? extends @NonNull T> source1, @NonNull MaybeSource<? extends @NonNull T> source2, @NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> isEqual) Returns aSingle
that emits aBoolean
value that indicates whether twoMaybeSource
s are the same by comparing the items emitted by eachMaybeSource
pairwise based on the results of a specified equality function.Observable.sequenceEqual
(@NonNull ObservableSource<? extends @NonNull T> source1, @NonNull ObservableSource<? extends @NonNull T> source2) Returns aSingle
that emits aBoolean
value that indicates whether twoObservableSource
sequences are the same by comparing the items emitted by eachObservableSource
pairwise.Observable.sequenceEqual
(@NonNull ObservableSource<? extends @NonNull T> source1, @NonNull ObservableSource<? extends @NonNull T> source2, int bufferSize) Returns aSingle
that emits aBoolean
value that indicates whether twoObservableSource
sequences are the same by comparing the items emitted by eachObservableSource
pairwise.Observable.sequenceEqual
(@NonNull ObservableSource<? extends @NonNull T> source1, @NonNull ObservableSource<? extends @NonNull T> source2, @NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> isEqual) Returns aSingle
that emits aBoolean
value that indicates whether twoObservableSource
sequences are the same by comparing the items emitted by eachObservableSource
pairwise based on the results of a specified equality function.Observable.sequenceEqual
(@NonNull ObservableSource<? extends @NonNull T> source1, @NonNull ObservableSource<? extends @NonNull T> source2, @NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> isEqual, int bufferSize) Returns aSingle
that emits aBoolean
value that indicates whether twoObservableSource
sequences are the same by comparing the items emitted by eachObservableSource
pairwise based on the results of a specified equality function.Single.sequenceEqual
(@NonNull SingleSource<? extends @NonNull T> source1, @NonNull SingleSource<? extends @NonNull T> source2) Compares twoSingleSource
s and emitstrue
if they emit the same value (compared viaObject.equals(Object)
).Returns aSingle
that emits the single item emitted by the currentFlowable
if it emits only a single item, or a default item if the currentFlowable
emits no items.Returns aSingle
that emits the single item emitted by the currentObservable
, if the currentObservable
emits only a single item, or a default item if the currentObservable
emits no items.Flowable.singleOrError()
Returns aSingle
that emits the single item emitted by thisFlowable
, if thisFlowable
emits only a single item, otherwise if thisFlowable
completes without emitting any items aNoSuchElementException
will be signaled and if thisFlowable
emits more than one item, anIllegalArgumentException
will be signaled.Observable.singleOrError()
Returns aSingle
that emits the single item emitted by the currentObservable
if it emits only a single item, otherwise if the currentObservable
completes without emitting any items or emits more than one item aNoSuchElementException
orIllegalArgumentException
will be signaled respectively.Single.subscribeOn
(@NonNull Scheduler scheduler) Maybe.switchIfEmpty
(@NonNull SingleSource<? extends @NonNull T> other) Returns aSingle
that emits the items emitted by the currentMaybe
or the item of an alternateSingleSource
if the currentMaybe
is empty.Single.takeUntil
(@NonNull CompletableSource other) Returns aSingle
that emits the item emitted by the currentSingle
until aCompletableSource
terminates.Single.takeUntil
(@NonNull SingleSource<? extends @NonNull E> other) Returns aSingle
that emits the item emitted by the currentSingle
until a secondSingle
emits an item.Returns aSingle
that emits the item emitted by the currentSingle
until aPublisher
emits an item or completes.Single.timeInterval()
Measures the time (in milliseconds) between the subscription and success item emission of the currentSingle
and signals it as a tuple (Timed
) success value.Single.timeInterval
(@NonNull Scheduler scheduler) Measures the time (in milliseconds) between the subscription and success item emission of the currentSingle
and signals it as a tuple (Timed
) success value.Single.timeInterval
(@NonNull TimeUnit unit) Measures the time between the subscription and success item emission of the currentSingle
and signals it as a tuple (Timed
) success value.Single.timeInterval
(@NonNull TimeUnit unit, @NonNull Scheduler scheduler) Measures the time between the subscription and success item emission of the currentSingle
and signals it as a tuple (Timed
) success value.Signals aTimeoutException
if the currentSingle
doesn't signal a success value within the specified timeout window.Signals aTimeoutException
if the currentSingle
doesn't signal a success value within the specified timeout window.Single.timeout
(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, @NonNull SingleSource<? extends @NonNull T> fallback) Runs the currentSingle
and if it doesn't signal within the specified timeout window, it is disposed and the otherSingleSource
subscribed to.Single.timeout
(long timeout, @NonNull TimeUnit unit, @NonNull SingleSource<? extends @NonNull T> fallback) Runs the currentSingle
and if it doesn't signal within the specified timeout window, it is disposed and the otherSingleSource
subscribed to.Single.timeout0
(long timeout, TimeUnit unit, Scheduler scheduler, SingleSource<? extends @NonNull T> fallback) Signals success with 0L value after the given delay when aSingleObserver
subscribes.Signals success with 0L value on the specifiedScheduler
after the given delay when aSingleObserver
subscribes.Single.timestamp()
Flowable.toList()
Returns aSingle
that emits a single item, a list composed of all the items emitted by the finite upstream sourcePublisher
.Flowable.toList
(int capacityHint) Returns aSingle
that emits a single item, a list composed of all the items emitted by the finite sourcePublisher
.Returns aSingle
that emits a single item, a list composed of all the items emitted by the finite sourcePublisher
.Observable.toList()
Observable.toList
(int capacityHint) Returns aSingle
that emits a single item, aCollection
(subclass) composed of all the items emitted by the finite upstreamObservable
.Flowable.toMap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector) Flowable.toMap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, @NonNull Supplier<? extends Map<@NonNull K, @NonNull V>> mapSupplier) Observable.toMap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector) Observable.toMap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, @NonNull Supplier<? extends Map<@NonNull K, @NonNull V>> mapSupplier) Flowable.toMultimap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector) Flowable.toMultimap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, @NonNull Supplier<? extends Map<@NonNull K, Collection<@NonNull V>>> mapSupplier, @NonNull Function<? super @NonNull K, ? extends Collection<? super @NonNull V>> collectionFactory) Flowable.toMultimap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, @NonNull Supplier<Map<@NonNull K, Collection<@NonNull V>>> mapSupplier) Observable.toMultimap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, @NonNull Supplier<? extends Map<@NonNull K, Collection<@NonNull V>>> mapSupplier, @NonNull Function<? super @NonNull K, ? extends Collection<? super @NonNull V>> collectionFactory) Returns aSingle
that emits a singleMap
(subclass), returned by a specifiedmapFactory
function, that contains a customCollection
of values, extracted by a specifiedvalueSelector
function from items emitted by the current and finiteObservable
, and keyed by thekeySelector
function.Observable.toMultimap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, @NonNull Supplier<Map<@NonNull K, Collection<@NonNull V>>> mapSupplier) Observable.toMultimap
(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, Function<? super @NonNull T, ? extends @NonNull V> valueSelector) Maybe.toSingle()
Converts thisMaybe
into aSingle
instance composing disposal through and turning an emptyMaybe
into a signal ofNoSuchElementException
.Completable.toSingleDefault
(@NonNull T completionValue) Converts thisCompletable
into aSingle
which when thisCompletable
completes normally, emits the given value throughonSuccess
.Flowable.toSortedList()
Flowable.toSortedList
(int capacityHint) Flowable.toSortedList
(@NonNull Comparator<? super @NonNull T> comparator) Flowable.toSortedList
(@NonNull Comparator<? super @NonNull T> comparator, int capacityHint) Observable.toSortedList()
Observable.toSortedList
(int capacityHint) Observable.toSortedList
(@NonNull Comparator<? super @NonNull T> comparator) Observable.toSortedList
(@NonNull Comparator<? super @NonNull T> comparator, int capacityHint) Single.unsafeCreate
(@NonNull SingleSource<@NonNull T> onSubscribe) Advanced use only: creates aSingle
instance without any safeguards by using a callback that is called with aSingleObserver
.Single.unsubscribeOn
(@NonNull Scheduler scheduler) Returns aSingle
which makes sure when aSingleObserver
disposes theDisposable
, that call is propagated up on the specifiedScheduler
.Single.using
(@NonNull Supplier<@NonNull U> resourceSupplier, @NonNull Function<? super @NonNull U, ? extends SingleSource<? extends @NonNull T>> sourceSupplier, @NonNull Consumer<? super @NonNull U> resourceCleanup) Allows using and disposing a resource while running aSingleSource
instance generated from that resource (similar to a try-with-resources).Single.using
(@NonNull Supplier<@NonNull U> resourceSupplier, @NonNull Function<? super @NonNull U, ? extends SingleSource<? extends @NonNull T>> sourceSupplier, @NonNull Consumer<? super @NonNull U> resourceCleanup, boolean eager) Allows using and disposing a resource while running aSingleSource
instance generated from that resource (similar to a try-with-resources).Single.wrap
(@NonNull SingleSource<@NonNull T> source) static <@NonNull T1,
@NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull T8, @NonNull T9, @NonNull R>
@NonNull Single<R> Single.zip
(@NonNull SingleSource<? extends @NonNull T1> source1, @NonNull SingleSource<? extends @NonNull T2> source2, @NonNull SingleSource<? extends @NonNull T3> source3, @NonNull SingleSource<? extends @NonNull T4> source4, @NonNull SingleSource<? extends @NonNull T5> source5, @NonNull SingleSource<? extends @NonNull T6> source6, @NonNull SingleSource<? extends @NonNull T7> source7, @NonNull SingleSource<? extends @NonNull T8> source8, @NonNull SingleSource<? extends @NonNull T9> source9, @NonNull Function9<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? super @NonNull T7, ? super @NonNull T8, ? super @NonNull T9, ? extends @NonNull R> zipper) Returns aSingle
that emits the results of a specified combiner function applied to nine items emitted by nine otherSingleSource
s.static <@NonNull T1,
@NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull T8, @NonNull R>
@NonNull Single<R> Single.zip
(@NonNull SingleSource<? extends @NonNull T1> source1, @NonNull SingleSource<? extends @NonNull T2> source2, @NonNull SingleSource<? extends @NonNull T3> source3, @NonNull SingleSource<? extends @NonNull T4> source4, @NonNull SingleSource<? extends @NonNull T5> source5, @NonNull SingleSource<? extends @NonNull T6> source6, @NonNull SingleSource<? extends @NonNull T7> source7, @NonNull SingleSource<? extends @NonNull T8> source8, @NonNull Function8<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? super @NonNull T7, ? super @NonNull T8, ? extends @NonNull R> zipper) Returns aSingle
that emits the results of a specified combiner function applied to eight items emitted by eight otherSingleSource
s.static <@NonNull T1,
@NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull R>
@NonNull Single<R> Single.zip
(@NonNull SingleSource<? extends @NonNull T1> source1, @NonNull SingleSource<? extends @NonNull T2> source2, @NonNull SingleSource<? extends @NonNull T3> source3, @NonNull SingleSource<? extends @NonNull T4> source4, @NonNull SingleSource<? extends @NonNull T5> source5, @NonNull SingleSource<? extends @NonNull T6> source6, @NonNull SingleSource<? extends @NonNull T7> source7, @NonNull Function7<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? super @NonNull T7, ? extends @NonNull R> zipper) Returns aSingle
that emits the results of a specified combiner function applied to seven items emitted by seven otherSingleSource
s.static <@NonNull T1,
@NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull R>
@NonNull Single<R> Single.zip
(@NonNull SingleSource<? extends @NonNull T1> source1, @NonNull SingleSource<? extends @NonNull T2> source2, @NonNull SingleSource<? extends @NonNull T3> source3, @NonNull SingleSource<? extends @NonNull T4> source4, @NonNull SingleSource<? extends @NonNull T5> source5, @NonNull SingleSource<? extends @NonNull T6> source6, @NonNull Function6<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? extends @NonNull R> zipper) Returns aSingle
that emits the results of a specified combiner function applied to six items emitted by six otherSingleSource
s.static <@NonNull T1,
@NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull R>
@NonNull Single<R> Single.zip
(@NonNull SingleSource<? extends @NonNull T1> source1, @NonNull SingleSource<? extends @NonNull T2> source2, @NonNull SingleSource<? extends @NonNull T3> source3, @NonNull SingleSource<? extends @NonNull T4> source4, @NonNull SingleSource<? extends @NonNull T5> source5, @NonNull Function5<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? extends @NonNull R> zipper) Returns aSingle
that emits the results of a specified combiner function applied to five items emitted by five otherSingleSource
s.Single.zip
(@NonNull SingleSource<? extends @NonNull T1> source1, @NonNull SingleSource<? extends @NonNull T2> source2, @NonNull SingleSource<? extends @NonNull T3> source3, @NonNull SingleSource<? extends @NonNull T4> source4, @NonNull Function4<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? extends @NonNull R> zipper) Returns aSingle
that emits the results of a specified combiner function applied to four items emitted by four otherSingleSource
s.Single.zip
(@NonNull SingleSource<? extends @NonNull T1> source1, @NonNull SingleSource<? extends @NonNull T2> source2, @NonNull SingleSource<? extends @NonNull T3> source3, @NonNull Function3<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? extends @NonNull R> zipper) Returns aSingle
that emits the results of a specified combiner function applied to three items emitted by three otherSingleSource
s.Single.zip
(@NonNull SingleSource<? extends @NonNull T1> source1, @NonNull SingleSource<? extends @NonNull T2> source2, @NonNull BiFunction<? super @NonNull T1, ? super @NonNull T2, ? extends @NonNull R> zipper) Returns aSingle
that emits the results of a specified combiner function applied to two items emitted by two otherSingleSource
s.Single.zip
(@NonNull Iterable<@NonNull ? extends SingleSource<? extends @NonNull T>> sources, @NonNull Function<? super Object[], ? extends @NonNull R> zipper) Waits until allSingleSource
sources provided by theIterable
sequence signal a success value and calls a zipper function with an array of these values to return a result to be emitted to the downstream.Single.zipArray
(@NonNull Function<? super Object[], ? extends @NonNull R> zipper, @NonNull SingleSource<? extends @NonNull T>... sources) Waits until allSingleSource
sources provided via an array signal a success value and calls a zipper function with an array of these values to return a result to be emitted to downstream.Single.zipWith
(@NonNull SingleSource<@NonNull U> other, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> zipper) Returns aSingle
that emits the result of applying a specified function to the pair of items emitted by the currentSingle
and another specifiedSingleSource
.Methods in io.reactivex.rxjava3.core with parameters of type SingleModifier and TypeMethodDescriptionApplies a function to the upstreamSingle
and returns a converted value of typeR
.Applies a function to the upstreamSingle
and returns aSingleSource
with optionally different element type. -
Uses of Single in io.reactivex.rxjava3.internal.jdk8
Subclasses of Single in io.reactivex.rxjava3.internal.jdk8Modifier and TypeClassDescriptionfinal class
Collect items into a container defined by a StreamCollector
callback set.final class
Collect items into a container defined by a StreamCollector
callback set.final class
Wrap a CompletionStage and signal its outcome.Fields in io.reactivex.rxjava3.internal.jdk8 declared as SingleModifier and TypeFieldDescriptionSingleFlattenStreamAsFlowable.source
SingleFlattenStreamAsObservable.source
SingleMapOptional.source
Constructors in io.reactivex.rxjava3.internal.jdk8 with parameters of type Single -
Uses of Single in io.reactivex.rxjava3.internal.operators.completable
Subclasses of Single in io.reactivex.rxjava3.internal.operators.completableModifier and TypeClassDescriptionfinal class
Turn the signal types of a Completable source into a single Notification of equal kind.final class
-
Uses of Single in io.reactivex.rxjava3.internal.operators.flowable
Subclasses of Single in io.reactivex.rxjava3.internal.operators.flowableModifier and TypeClassDescriptionfinal class
final class
final class
final class
final class
final class
Consumes the source Publisher and emits its last item or the defaultItem if empty.final class
Reduce a sequence of values, starting from a seed value and by using an accumulator function and return the last accumulated value.final class
Reduce a sequence of values, starting from a generated seed value and by using an accumulator function and return the last accumulated value.final class
final class
final class
FlowableToListSingle<T,
U extends Collection<? super T>> -
Uses of Single in io.reactivex.rxjava3.internal.operators.maybe
Subclasses of Single in io.reactivex.rxjava3.internal.operators.maybeModifier and TypeClassDescriptionfinal class
Signals true if the source signals a value that is object-equals with the provided value, false otherwise or for empty sources.final class
MaybeCount<T>
Signals 1L if the source signalled an item or 0L if the source is empty.final class
Compares two MaybeSources to see if they are both empty or emit the same value compared via a BiPredicate.final class
Signals true if the source Maybe signals onComplete, signals false if the source Maybe signals onSuccess.final class
Turn the signal types of a Maybe source into a single Notification of equal kind.final class
Subscribes to the other source if the main source is empty.final class
Wraps a MaybeSource and exposes its onSuccess and onError signals and signals NoSuchElementException for onComplete ifdefaultValue
is null. -
Uses of Single in io.reactivex.rxjava3.internal.operators.observable
Subclasses of Single in io.reactivex.rxjava3.internal.operators.observableModifier and TypeClassDescriptionfinal class
final class
final class
final class
final class
final class
Consumes the source ObservableSource and emits its last item, the defaultItem if empty or a NoSuchElementException if even the defaultItem is null.final class
Reduce a sequence of values, starting from a seed value and by using an accumulator function and return the last accumulated value.final class
Reduce a sequence of values, starting from a generated seed value and by using an accumulator function and return the last accumulated value.final class
final class
final class
ObservableToListSingle<T,
U extends Collection<? super T>> -
Uses of Single in io.reactivex.rxjava3.internal.operators.single
Subclasses of Single in io.reactivex.rxjava3.internal.operators.singleModifier and TypeClassDescriptionfinal class
SingleAmb<T>
final class
SingleCache<T>
final class
final class
SingleCreate<T>
final class
SingleDefer<T>
final class
SingleDelay<T>
final class
final class
final class
final class
final class
SingleDetach<T>
Breaks the references between the upstream and downstream when the Maybe terminates.final class
Calls a consumer after pushing the current item to the downstream.final class
Calls an action after pushing the current item or an error to the downstream.final class
Execute an action after an onSuccess, onError or a dispose event.final class
final class
final class
final class
Invokes callbacks upononSubscribe
from upstream anddispose
from downstream.final class
Calls a callback when the upstream calls onSubscribe with a disposable.final class
final class
final class
SingleEquals<T>
final class
SingleError<T>
final class
SingleFlatMap<T,
R> final class
SingleFlatMapBiSelector<T,
U, R> Maps a source item to another SingleSource then calls a BiFunction with the original item and the secondary item to generate the final result.final class
Maps a value into a SingleSource and relays its signal.final class
final class
final class
Calls a supplier and emits its value or exception to the incoming SingleObserver.final class
final class
SingleHide<T>
final class
SingleJust<T>
final class
SingleLift<T,
R> final class
SingleMap<T,
R> final class
Turn the signal types of a Single source into a single Notification of equal kind.final class
final class
final class
final class
final class
final class
SingleTakeUntil<T,
U> Signals the events of the source Single or signals a CancellationException if the other Publisher signalled first.final class
Measures the time between subscription and the success item emission from the upstream and emits this as aTimed
success value.final class
final class
Signals a0L
after the specified delay.final class
Makes sure a dispose() call from downstream happens on the specified scheduler.final class
SingleUsing<T,
U> final class
SingleZipArray<T,
R> final class
SingleZipIterable<T,
R> Fields in io.reactivex.rxjava3.internal.operators.single declared as SingleModifier and TypeFieldDescriptionSingleNever.INSTANCE
SingleDematerialize.source
SingleDoOnLifecycle.source
SingleMaterialize.source
SingleOnErrorComplete.source
Constructors in io.reactivex.rxjava3.internal.operators.single with parameters of type SingleModifierConstructorDescriptionSingleDematerialize
(Single<T> source, Function<? super T, Notification<R>> selector) SingleDoOnLifecycle
(Single<T> upstream, Consumer<? super Disposable> onSubscribe, Action onDispose) SingleMaterialize
(Single<T> source) SingleOnErrorComplete
(Single<T> source, Predicate<? super Throwable> predicate) -
Uses of Single in io.reactivex.rxjava3.plugins
Fields in io.reactivex.rxjava3.plugins with type parameters of type SingleModifier and TypeFieldDescriptionRxJavaPlugins.onSingleAssembly
RxJavaPlugins.onSingleAssembly
(package private) static @Nullable BiFunction
<? super Single, @NonNull ? super SingleObserver, @NonNull ? extends SingleObserver> RxJavaPlugins.onSingleSubscribe
Methods in io.reactivex.rxjava3.plugins that return SingleModifier and TypeMethodDescriptionRxJavaPlugins.onAssembly
(@NonNull Single<@NonNull T> source) Calls the associated hook function.Methods in io.reactivex.rxjava3.plugins that return types with arguments of type SingleModifier and TypeMethodDescriptionRxJavaPlugins.getOnSingleAssembly()
Returns the current hook function.RxJavaPlugins.getOnSingleAssembly()
Returns the current hook function.static @Nullable BiFunction
<? super Single, @NonNull ? super SingleObserver, @NonNull ? extends SingleObserver> RxJavaPlugins.getOnSingleSubscribe()
Returns the current hook function.Methods in io.reactivex.rxjava3.plugins with parameters of type SingleModifier and TypeMethodDescriptionRxJavaPlugins.onAssembly
(@NonNull Single<@NonNull T> source) Calls the associated hook function.static <@NonNull T>
@NonNull SingleObserver<? super T> RxJavaPlugins.onSubscribe
(@NonNull Single<@NonNull T> source, @NonNull SingleObserver<? super @NonNull T> observer) Calls the associated hook function.Method parameters in io.reactivex.rxjava3.plugins with type arguments of type SingleModifier and TypeMethodDescriptionstatic void
RxJavaPlugins.setOnSingleAssembly
(@Nullable Function<? super Single, ? extends Single> onSingleAssembly) Sets the specific hook function.static void
RxJavaPlugins.setOnSingleAssembly
(@Nullable Function<? super Single, ? extends Single> onSingleAssembly) Sets the specific hook function.static void
RxJavaPlugins.setOnSingleSubscribe
(@Nullable BiFunction<? super Single, @NonNull ? super SingleObserver, @NonNull ? extends SingleObserver> onSingleSubscribe) Sets the specific hook function. -
Uses of Single in io.reactivex.rxjava3.subjects
Subclasses of Single in io.reactivex.rxjava3.subjectsModifier and TypeClassDescriptionfinal class
Represents a hot Single-like source and consumer of events similar to Subjects.