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 multipleSingleSources and signals the events of the first one that signals (disposing the rest).Single.ambArray(@NonNull SingleSource<? extends @NonNull T>... sources) Runs multipleSingleSources 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 otherSingleSourcewhichever signals first.Completable.andThen(@NonNull SingleSource<@NonNull T> next) Returns aSinglewhich will subscribe to thisCompletableand once that is completed then will subscribe to thenextSingleSource.Returns aSinglethat emitstrueif any item emitted by the currentFlowablesatisfies a specified condition, otherwisefalse.Returns aSinglethat emitstrueif any item emitted by the currentObservablesatisfies a specified condition, otherwisefalse.Single.cache()Stores the success value or exception from the currentSingleand replays it to lateSingleObservers.Casts the success value of the currentSingleinto the target type or signals aClassCastExceptionif 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 sourcePublisherinto a single mutable data structure and returns aSinglethat 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 sourceObservableinto a single mutable data structure and returns aSinglethat emits this structure.Flowable.collectInto(@NonNull U initialItem, @NonNull BiConsumer<? super @NonNull U, ? super @NonNull T> collector) Collects items emitted by the finite sourcePublisherinto a single mutable data structure and returns aSinglethat emits this structure.Observable.collectInto(@NonNull U initialItem, @NonNull BiConsumer<? super @NonNull U, ? super @NonNull T> collector) Collects items emitted by the finite sourceObservableinto a single mutable data structure and returns aSinglethat emits this structure.Transform aSingleby applying a particularSingleTransformerfunction to it.Single.concatMap(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Returns aSinglethat is based on applying a specified function to the item emitted by the currentSingle, where that function returns aSingleSource.Signalstrueif the currentSinglesignals a success value that isObject.equals(Object)with the value provided.Signalstrueif the currentSinglesignals 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 aSinglethat emits the item emitted by the currentMaybeor a specified default item if the currentMaybeis empty.Calls aSupplierfor each individualSingleObserverto return the actualSingleSourceto be subscribed to.Delays the emission of the success signal from the currentSingleby the specified amount.Delays the emission of the success or error signal from the currentSingleby the specified amount.Delays the emission of the success signal from the currentSingleby the specified amount.Delays the emission of the success or error signal from the currentSingleby the specified amount.Single.delaySubscription(long time, @NonNull TimeUnit unit) Delays the actual subscription to the currentSingleuntil the given time delay elapsed.Single.delaySubscription(long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Delays the actual subscription to the currentSingleuntil the given time delay elapsed.Single.delaySubscription(@NonNull CompletableSource subscriptionIndicator) Delays the actual subscription to the currentSingleuntil the given otherCompletableSourcecompletes.Single.delaySubscription(@NonNull ObservableSource<@NonNull U> subscriptionIndicator) Delays the actual subscription to the currentSingleuntil the given otherObservableSourcesignals its first value or completes.Single.delaySubscription(@NonNull SingleSource<@NonNull U> subscriptionIndicator) Delays the actual subscription to the currentSingleuntil the given otherSingleSourcesignals success.Single.delaySubscription(@NonNull org.reactivestreams.Publisher<@NonNull U> subscriptionIndicator) Delays the actual subscription to the currentSingleuntil the given otherPublishersignals 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 thisSinglesignalsonSuccessoronErroror gets disposed by the downstream.Single.doOnDispose(@NonNull Action onDispose) Calls the sharedActionif aSingleObserversubscribed to the currentSingledisposes the commonDisposableit received viaonSubscribe.Calls the shared consumer with the error sent viaonErrorfor eachSingleObserverthat subscribes to the currentSingle.Single.doOnEvent(@NonNull BiConsumer<@Nullable ? super @NonNull T, @Nullable ? super Throwable> onEvent) Calls the shared consumer with the error sent viaonErroror the value viaonSuccessfor eachSingleObserverthat subscribes to the currentSingle.Single.doOnLifecycle(@NonNull Consumer<? super Disposable> onSubscribe, @NonNull Action onDispose) Calls the appropriateonXXXmethod (shared between allSingleObservers) for the lifecycle events of the sequence (subscription, disposal).Single.doOnSubscribe(@NonNull Consumer<? super Disposable> onSubscribe) Calls the shared consumer with theDisposablesent through theonSubscribefor eachSingleObserverthat subscribes to the currentSingle.Single.doOnSuccess(@NonNull Consumer<? super @NonNull T> onSuccess) Calls the shared consumer with the success value sent viaonSuccessfor eachSingleObserverthat subscribes to the currentSingle.Single.doOnTerminate(@NonNull Action onTerminate) Returns aSingleinstance that calls the givenonTerminatecallback just before thisSinglecompletes normally or with an exception.Returns aSinglethat 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 aSinglethat 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 aSinglethat emits the item found at a specified index in a sequence of emissions from thisFlowableor signals aNoSuchElementExceptionif thisFlowablehas fewer elements than index.Observable.elementAtOrError(long index) Returns aSinglethat emits the item found at a specified index in a sequence of emissions from the currentObservableor signals aNoSuchElementExceptionif the currentObservablesignals fewer elements than index.Signals aThrowablereturned by the callback function for each individualSingleObserver.Returns aSinglethat invokes a subscriber'sonErrormethod when the subscriber subscribes to it.Returns aSinglethat emits only the very first item emitted by thisFlowable, or a default item if thisFlowablecompletes without emitting anything.Returns aSinglethat emits only the very first item emitted by the currentObservable, or a default item if the currentObservablecompletes without emitting any items.Flowable.firstOrError()Returns aSinglethat emits only the very first item emitted by thisFlowableor signals aNoSuchElementExceptionif thisFlowableis empty.Observable.firstOrError()Returns aSinglethat emits only the very first item emitted by the currentObservableor signals aNoSuchElementExceptionif the currentObservableis empty.Single.flatMap(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Returns aSinglethat 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 theonSuccessoronErrorsignals of the currentSingleinto aSingleSourceand 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 aSinglethat emits the results of a specified function to the pair of values emitted by the currentSingleand a specified mappedSingleSource.Single.fromCallable(@NonNull Callable<? extends @NonNull T> callable) Returns aSinglethat invokes the givenCallablefor each incomingSingleObserverand 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 aFutureinto aSingleand awaits its outcome in a blocking fashion.Single.fromFuture(@NonNull Future<? extends @NonNull T> future, long timeout, @NonNull TimeUnit unit) Converts aFutureinto aSingleand awaits its outcome, or timeout, in a blocking fashion.Single.fromMaybe(@NonNull MaybeSource<@NonNull T> maybe) Returns aSingleinstance that when subscribed to, subscribes to theMaybeSourceinstance and emitsonSuccessas a single item, turns anonCompleteintoNoSuchElementExceptionerror signal or forwards theonErrorsignal.Single.fromMaybe(@NonNull MaybeSource<@NonNull T> maybe, @NonNull T defaultItem) Returns aSingleinstance that when subscribed to, subscribes to theMaybeSourceinstance and emitsonSuccessas a single item, emits thedefaultItemfor anonCompletesignal or forwards theonErrorsignal.Single.fromObservable(@NonNull ObservableSource<? extends @NonNull T> observable) Wraps a specificObservableSourceinto aSingleand signals its single element or error.Single.fromPublisher(@NonNull org.reactivestreams.Publisher<? extends @NonNull T> publisher) Wraps a specificPublisherinto aSingleand signals its single element or error.Single.fromSupplier(@NonNull Supplier<? extends @NonNull T> supplier) Returns aSinglethat invokes passed supplier and emits its result for each individualSingleObserverthat subscribes.Single.hide()Hides the identity of the currentSingle, including theDisposablethat is sent to the downstream viaonSubscribe().Flowable.isEmpty()Maybe.isEmpty()Observable.isEmpty()Returns aSinglethat emits a specified item.Returns aSinglethat emits only the last item emitted by thisFlowable, or a default item if thisFlowablecompletes without emitting any items.Returns aSinglethat emits only the last item emitted by the currentObservable, or a default item if the currentObservablecompletes without emitting any items.Flowable.lastOrError()Returns aSinglethat emits only the last item emitted by thisFlowableor signals aNoSuchElementExceptionif thisFlowableis empty.Observable.lastOrError()Returns aSinglethat emits only the last item emitted by the currentObservableor signals aNoSuchElementExceptionif the currentObservableis empty.This method requires advanced knowledge about building operators, please consider other standard composition methods first; Returns aSinglewhich, when subscribed to, invokes theapply(SingleObserver)method of the providedSingleOperatorfor each individual downstreamSingleand allows the insertion of a custom operator by accessing the downstream'sSingleObserverduring 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 aSinglethat applies a specified function to the item emitted by the currentSingleand emits the result of this function application.final <@NonNull T>
@NonNull Single<Notification<T>> Completable.materialize()Maps the signal types of thisCompletableinto aNotificationof 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 thisMaybeinto aNotificationof the same kind and emits it as aSingle'sonSuccessvalue to downstream.final @NonNull Single<Notification<T>> Single.materialize()Maps the signal types of thisSingleinto aNotificationof the same kind and emits it as a single success value to downstream.Single.merge(@NonNull SingleSource<? extends SingleSource<? extends @NonNull T>> source) Flattens aSingleSourcethat emits aSingleSingleinto a singleSinglethat 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 currentSingleon the specifiedScheduler, asynchronously.Single.onErrorResumeNext(@NonNull Function<? super Throwable, ? extends SingleSource<? extends @NonNull T>> fallbackSupplier) Resumes the flow with aSingleSourcereturned for the failureThrowableof the currentSingleby a function instead of signaling the error viaonError.Single.onErrorResumeWith(@NonNull SingleSource<? extends @NonNull T> fallback) Resumes the flow with the givenSingleSourcewhen the currentSinglefails instead of signaling the error viaonError.Ends the flow with a success item returned by a function for theThrowableerror signaled by the currentSingleinstead of signaling the error viaonError.Single.onErrorReturnItem(@NonNull T item) Signals the specified value as success in case the currentSinglesignals an error.Single.onTerminateDetach()Nulls out references to the upstream producer and downstreamSingleObserverif the sequence is terminated or downstream callsdispose().Flowable.reduce(@NonNull R seed, @NonNull BiFunction<@NonNull R, ? super @NonNull T, @NonNull R> reducer) Returns aSinglethat applies a specified accumulator function to the first item emitted by the currentFlowableand a specified seed value, then feeds the result of that function along with the second item emitted by the currentFlowableinto 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 aSinglethat applies a specified accumulator function to the first item emitted by the currentObservableand a specified seed value, then feeds the result of that function along with the second item emitted by the currentObservableinto 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 aSinglethat applies a specified accumulator function to the first item emitted by the currentFlowableand a seed value derived from calling a specifiedseedSupplier, then feeds the result of that function along with the second item emitted by the currentFlowableinto 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 aSinglethat applies a specified accumulator function to the first item emitted by the currentObservableand a seed value derived from calling a specifiedseedSupplier, then feeds the result of that function along with the second item emitted by the currentObservableinto 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 currentSingleindefinitely if it fails with anonError.Single.retry(long times) Repeatedly re-subscribe at most the specified times to the currentSingleif 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 currentSingleif the given predicate returnstruewhen theSinglefails with anonError.Re-subscribe to the currentSingleif the given predicate returnstruewhen theSinglefails 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 currentSingleif and when thePublisherreturned 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 aSinglethat emits aBooleanvalue that indicates whether twoMaybeSourcesequences are the same by comparing the items emitted by eachMaybeSourcepairwise.Maybe.sequenceEqual(@NonNull MaybeSource<? extends @NonNull T> source1, @NonNull MaybeSource<? extends @NonNull T> source2, @NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> isEqual) Returns aSinglethat emits aBooleanvalue that indicates whether twoMaybeSources are the same by comparing the items emitted by eachMaybeSourcepairwise based on the results of a specified equality function.Observable.sequenceEqual(@NonNull ObservableSource<? extends @NonNull T> source1, @NonNull ObservableSource<? extends @NonNull T> source2) Returns aSinglethat emits aBooleanvalue that indicates whether twoObservableSourcesequences are the same by comparing the items emitted by eachObservableSourcepairwise.Observable.sequenceEqual(@NonNull ObservableSource<? extends @NonNull T> source1, @NonNull ObservableSource<? extends @NonNull T> source2, int bufferSize) Returns aSinglethat emits aBooleanvalue that indicates whether twoObservableSourcesequences are the same by comparing the items emitted by eachObservableSourcepairwise.Observable.sequenceEqual(@NonNull ObservableSource<? extends @NonNull T> source1, @NonNull ObservableSource<? extends @NonNull T> source2, @NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> isEqual) Returns aSinglethat emits aBooleanvalue that indicates whether twoObservableSourcesequences are the same by comparing the items emitted by eachObservableSourcepairwise 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 aSinglethat emits aBooleanvalue that indicates whether twoObservableSourcesequences are the same by comparing the items emitted by eachObservableSourcepairwise based on the results of a specified equality function.Single.sequenceEqual(@NonNull SingleSource<? extends @NonNull T> source1, @NonNull SingleSource<? extends @NonNull T> source2) Compares twoSingleSources and emitstrueif they emit the same value (compared viaObject.equals(Object)).Returns aSinglethat emits the single item emitted by the currentFlowableif it emits only a single item, or a default item if the currentFlowableemits no items.Returns aSinglethat emits the single item emitted by the currentObservable, if the currentObservableemits only a single item, or a default item if the currentObservableemits no items.Flowable.singleOrError()Returns aSinglethat emits the single item emitted by thisFlowable, if thisFlowableemits only a single item, otherwise if thisFlowablecompletes without emitting any items aNoSuchElementExceptionwill be signaled and if thisFlowableemits more than one item, anIllegalArgumentExceptionwill be signaled.Observable.singleOrError()Returns aSinglethat emits the single item emitted by the currentObservableif it emits only a single item, otherwise if the currentObservablecompletes without emitting any items or emits more than one item aNoSuchElementExceptionorIllegalArgumentExceptionwill be signaled respectively.Single.subscribeOn(@NonNull Scheduler scheduler) Maybe.switchIfEmpty(@NonNull SingleSource<? extends @NonNull T> other) Returns aSinglethat emits the items emitted by the currentMaybeor the item of an alternateSingleSourceif the currentMaybeis empty.Single.takeUntil(@NonNull CompletableSource other) Returns aSinglethat emits the item emitted by the currentSingleuntil aCompletableSourceterminates.Single.takeUntil(@NonNull SingleSource<? extends @NonNull E> other) Returns aSinglethat emits the item emitted by the currentSingleuntil a secondSingleemits an item.Returns aSinglethat emits the item emitted by the currentSingleuntil aPublisheremits an item or completes.Single.timeInterval()Measures the time (in milliseconds) between the subscription and success item emission of the currentSingleand 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 currentSingleand 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 currentSingleand 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 currentSingleand signals it as a tuple (Timed) success value.Signals aTimeoutExceptionif the currentSingledoesn't signal a success value within the specified timeout window.Signals aTimeoutExceptionif the currentSingledoesn'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 currentSingleand if it doesn't signal within the specified timeout window, it is disposed and the otherSingleSourcesubscribed to.Single.timeout(long timeout, @NonNull TimeUnit unit, @NonNull SingleSource<? extends @NonNull T> fallback) Runs the currentSingleand if it doesn't signal within the specified timeout window, it is disposed and the otherSingleSourcesubscribed to.Single.timeout0(long timeout, TimeUnit unit, Scheduler scheduler, SingleSource<? extends @NonNull T> fallback) Signals success with 0L value after the given delay when aSingleObserversubscribes.Signals success with 0L value on the specifiedSchedulerafter the given delay when aSingleObserversubscribes.Single.timestamp()Flowable.toList()Returns aSinglethat emits a single item, a list composed of all the items emitted by the finite upstream sourcePublisher.Flowable.toList(int capacityHint) Returns aSinglethat emits a single item, a list composed of all the items emitted by the finite sourcePublisher.Returns aSinglethat emits a single item, a list composed of all the items emitted by the finite sourcePublisher.Observable.toList()Observable.toList(int capacityHint) Returns aSinglethat 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 aSinglethat emits a singleMap(subclass), returned by a specifiedmapFactoryfunction, that contains a customCollectionof values, extracted by a specifiedvalueSelectorfunction from items emitted by the current and finiteObservable, and keyed by thekeySelectorfunction.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 thisMaybeinto aSingleinstance composing disposal through and turning an emptyMaybeinto a signal ofNoSuchElementException.Completable.toSingleDefault(@NonNull T completionValue) Converts thisCompletableinto aSinglewhich when thisCompletablecompletes 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 aSingleinstance without any safeguards by using a callback that is called with aSingleObserver.Single.unsubscribeOn(@NonNull Scheduler scheduler) Returns aSinglewhich makes sure when aSingleObserverdisposes 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 aSingleSourceinstance 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 aSingleSourceinstance 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 aSinglethat emits the results of a specified combiner function applied to nine items emitted by nine otherSingleSources.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 aSinglethat emits the results of a specified combiner function applied to eight items emitted by eight otherSingleSources.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 aSinglethat emits the results of a specified combiner function applied to seven items emitted by seven otherSingleSources.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 aSinglethat emits the results of a specified combiner function applied to six items emitted by six otherSingleSources.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 aSinglethat emits the results of a specified combiner function applied to five items emitted by five otherSingleSources.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 aSinglethat emits the results of a specified combiner function applied to four items emitted by four otherSingleSources.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 aSinglethat emits the results of a specified combiner function applied to three items emitted by three otherSingleSources.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 aSinglethat emits the results of a specified combiner function applied to two items emitted by two otherSingleSources.Single.zip(@NonNull Iterable<@NonNull ? extends SingleSource<? extends @NonNull T>> sources, @NonNull Function<? super Object[], ? extends @NonNull R> zipper) Waits until allSingleSourcesources provided by theIterablesequence 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 allSingleSourcesources 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 aSinglethat emits the result of applying a specified function to the pair of items emitted by the currentSingleand another specifiedSingleSource.Methods in io.reactivex.rxjava3.core with parameters of type SingleModifier and TypeMethodDescriptionApplies a function to the upstreamSingleand returns a converted value of typeR.Applies a function to the upstreamSingleand returns aSingleSourcewith optionally different element type. -
Uses of Single in io.reactivex.rxjava3.internal.jdk8
Subclasses of Single in io.reactivex.rxjava3.internal.jdk8Modifier and TypeClassDescriptionfinal classCollect items into a container defined by a StreamCollectorcallback set.final classCollect items into a container defined by a StreamCollectorcallback set.final classWrap a CompletionStage and signal its outcome.Fields in io.reactivex.rxjava3.internal.jdk8 declared as SingleModifier and TypeFieldDescriptionSingleFlattenStreamAsFlowable.sourceSingleFlattenStreamAsObservable.sourceSingleMapOptional.sourceConstructors 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 classTurn 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 classfinal classfinal classfinal classfinal classfinal classConsumes the source Publisher and emits its last item or the defaultItem if empty.final classReduce a sequence of values, starting from a seed value and by using an accumulator function and return the last accumulated value.final classReduce a sequence of values, starting from a generated seed value and by using an accumulator function and return the last accumulated value.final classfinal classfinal classFlowableToListSingle<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 classSignals true if the source signals a value that is object-equals with the provided value, false otherwise or for empty sources.final classMaybeCount<T>Signals 1L if the source signalled an item or 0L if the source is empty.final classCompares two MaybeSources to see if they are both empty or emit the same value compared via a BiPredicate.final classSignals true if the source Maybe signals onComplete, signals false if the source Maybe signals onSuccess.final classTurn the signal types of a Maybe source into a single Notification of equal kind.final classSubscribes to the other source if the main source is empty.final classWraps a MaybeSource and exposes its onSuccess and onError signals and signals NoSuchElementException for onComplete ifdefaultValueis null. -
Uses of Single in io.reactivex.rxjava3.internal.operators.observable
Subclasses of Single in io.reactivex.rxjava3.internal.operators.observableModifier and TypeClassDescriptionfinal classfinal classfinal classfinal classfinal classfinal classConsumes the source ObservableSource and emits its last item, the defaultItem if empty or a NoSuchElementException if even the defaultItem is null.final classReduce a sequence of values, starting from a seed value and by using an accumulator function and return the last accumulated value.final classReduce a sequence of values, starting from a generated seed value and by using an accumulator function and return the last accumulated value.final classfinal classfinal classObservableToListSingle<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 classSingleAmb<T>final classSingleCache<T>final classfinal classSingleCreate<T>final classSingleDefer<T>final classSingleDelay<T>final classfinal classfinal classfinal classfinal classSingleDetach<T>Breaks the references between the upstream and downstream when the Maybe terminates.final classCalls a consumer after pushing the current item to the downstream.final classCalls an action after pushing the current item or an error to the downstream.final classExecute an action after an onSuccess, onError or a dispose event.final classfinal classfinal classfinal classInvokes callbacks upononSubscribefrom upstream anddisposefrom downstream.final classCalls a callback when the upstream calls onSubscribe with a disposable.final classfinal classfinal classSingleEquals<T>final classSingleError<T>final classSingleFlatMap<T,R> final classSingleFlatMapBiSelector<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 classMaps a value into a SingleSource and relays its signal.final classfinal classfinal classCalls a supplier and emits its value or exception to the incoming SingleObserver.final classfinal classSingleHide<T>final classSingleJust<T>final classSingleLift<T,R> final classSingleMap<T,R> final classTurn the signal types of a Single source into a single Notification of equal kind.final classfinal classfinal classfinal classfinal classfinal classSingleTakeUntil<T,U> Signals the events of the source Single or signals a CancellationException if the other Publisher signalled first.final classMeasures the time between subscription and the success item emission from the upstream and emits this as aTimedsuccess value.final classfinal classSignals a0Lafter the specified delay.final classMakes sure a dispose() call from downstream happens on the specified scheduler.final classSingleUsing<T,U> final classSingleZipArray<T,R> final classSingleZipIterable<T,R> Fields in io.reactivex.rxjava3.internal.operators.single declared as SingleModifier and TypeFieldDescriptionSingleNever.INSTANCESingleDematerialize.sourceSingleDoOnLifecycle.sourceSingleMaterialize.sourceSingleOnErrorComplete.sourceConstructors 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.onSingleAssemblyRxJavaPlugins.onSingleAssembly(package private) static @Nullable BiFunction<? super Single, @NonNull ? super SingleObserver, @NonNull ? extends SingleObserver> RxJavaPlugins.onSingleSubscribeMethods 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 voidRxJavaPlugins.setOnSingleAssembly(@Nullable Function<? super Single, ? extends Single> onSingleAssembly) Sets the specific hook function.static voidRxJavaPlugins.setOnSingleAssembly(@Nullable Function<? super Single, ? extends Single> onSingleAssembly) Sets the specific hook function.static voidRxJavaPlugins.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 classRepresents a hot Single-like source and consumer of events similar to Subjects.