Uses of Class
io.reactivex.rxjava3.core.Maybe
Packages that use Maybe
Package
Description
Base reactive classes:
Flowable
, Observable
,
Single
, Maybe
and
Completable
; base reactive consumers;
other common base interfaces.Base interfaces and types for supporting operator-fusion.
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 Maybe in io.reactivex.rxjava3.core
Methods in io.reactivex.rxjava3.core that return MaybeModifier and TypeMethodDescriptionRuns multipleMaybeSource
s provided by anIterable
sequence and signals the events of the first one that signals (disposing the rest).Maybe.ambArray
(@NonNull MaybeSource<? extends @NonNull T>... sources) Runs multipleMaybeSource
s and signals the events of the first one that signals (disposing the rest).Maybe.ambWith
(@NonNull MaybeSource<? extends @NonNull T> other) Mirrors theMaybeSource
(current or provided) that first signals an event.Completable.andThen
(@NonNull MaybeSource<@NonNull T> next) Returns aMaybe
which will subscribe to thisCompletable
and once that is completed then will subscribe to thenext
MaybeSource
.Maybe.cache()
Returns aMaybe
that subscribes to thisMaybe
lazily, caches its event and replays it, to all the downstream subscribers.Casts the success value of the currentMaybe
into the target type or signals aClassCastException
if not compatible.Transform aMaybe
by applying a particularMaybeTransformer
function to it.Maybe.concatMap
(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper) Returns aMaybe
that is based on applying a specified function to the item emitted by the currentMaybe
, where that function returns aMaybeSource
.Single.concatMapMaybe
(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper) Returns aMaybe
that is based on applying a specified function to the item emitted by the currentSingle
, where that function returns aMaybeSource
.Maybe.concatMapSingle
(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Returns aMaybe
based on applying a specified function to the item emitted by the currentMaybe
, where that function returns aSingle
.Maybe.create
(@NonNull MaybeOnSubscribe<@NonNull T> onSubscribe) Provides an API (via a coldMaybe
) that bridges the reactive world with the callback-style world.Calls aSupplier
for each individualMaybeObserver
to return the actualMaybeSource
source to be subscribed to.Returns aMaybe
that signals the events emitted by the currentMaybe
shifted forward in time by a specified delay.Returns aMaybe
that signals the events emitted by the currentMaybe
shifted forward in time by a specified delay.Returns aMaybe
that signals the events emitted by the currentMaybe
shifted forward in time by a specified delay.Returns aMaybe
that signals the events emitted by the currentMaybe
shifted forward in time by a specified delay running on the specifiedScheduler
.Delays the emission of thisMaybe
until the givenPublisher
signals an item or completes.Maybe.delaySubscription
(long time, @NonNull TimeUnit unit) Returns aMaybe
that delays the subscription to the currentMaybe
by a given amount of time.Maybe.delaySubscription
(long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Returns aMaybe
that delays the subscription to the currentMaybe
by a given amount of time, both waiting and subscribing on a givenScheduler
.Maybe.delaySubscription
(@NonNull org.reactivestreams.Publisher<@NonNull U> subscriptionIndicator) Returns aMaybe
that delays the subscription to thisMaybe
until the otherPublisher
emits an element or completes normally.Maybe.dematerialize
(@NonNull Function<? super @NonNull T, @NonNull Notification<@NonNull R>> selector) Maps theNotification
success value of the currentMaybe
back into normalonSuccess
,onError
oronComplete
signals.Single.dematerialize
(@NonNull Function<? super @NonNull T, @NonNull Notification<@NonNull R>> selector) Maps theNotification
success value of the currentSingle
back into normalonSuccess
,onError
oronComplete
signals as aMaybe
source.Maybe.doAfterSuccess
(@NonNull Consumer<? super @NonNull T> onAfterSuccess) Calls the specifiedConsumer
with the success item after this item has been emitted to the downstream.Maybe.doAfterTerminate
(@NonNull Action onAfterTerminate) Calls the specified action after thisMaybe
signalsonSuccess
,onError
oronComplete
or gets disposed by the downstream.Maybe.doOnComplete
(@NonNull Action onComplete) Maybe.doOnDispose
(@NonNull Action onDispose) Calls the sharedAction
if aMaybeObserver
subscribed to the currentMaybe
disposes the commonDisposable
it received viaonSubscribe
.Calls the sharedConsumer
with the error sent viaonError
for eachMaybeObserver
that subscribes to the currentMaybe
.Maybe.doOnEvent
(@NonNull BiConsumer<@Nullable ? super @NonNull T, @Nullable ? super Throwable> onEvent) Calls the givenonEvent
callback with the (success value,null
) for anonSuccess
, (null
, throwable) for anonError
or (null
,null
) for anonComplete
signal from thisMaybe
before delivering said signal to the downstream.Maybe.doOnLifecycle
(@NonNull Consumer<? super Disposable> onSubscribe, @NonNull Action onDispose) Calls the appropriateonXXX
method (shared between allMaybeObserver
s) for the lifecycle events of the sequence (subscription, disposal).Maybe.doOnSubscribe
(@NonNull Consumer<? super Disposable> onSubscribe) Calls the sharedConsumer
with theDisposable
sent through theonSubscribe
for eachMaybeObserver
that subscribes to the currentMaybe
.Maybe.doOnSuccess
(@NonNull Consumer<? super @NonNull T> onSuccess) Calls the sharedConsumer
with the success value sent viaonSuccess
for eachMaybeObserver
that subscribes to the currentMaybe
.Maybe.doOnTerminate
(@NonNull Action onTerminate) Returns aMaybe
instance that calls the given onTerminate callback just before thisMaybe
completes normally or with an exception.Flowable.elementAt
(long index) Returns aMaybe
that emits the single item at a specified index in a sequence of emissions from thisFlowable
or completes if thisFlowable
sequence has fewer elements than index.Observable.elementAt
(long index) Returns aMaybe
that emits the single item at a specified index in a sequence of emissions from the currentObservable
or completes if the currentObservable
signals fewer elements than index.Maybe.empty()
Returns a (singleton)Maybe
instance that callsonComplete
immediately.Returns aMaybe
that invokes aMaybeObserver
'sonError
method when theMaybeObserver
subscribes to it.Returns aMaybe
that invokes a subscriber'sonError
method when the subscriber subscribes to it.Filters the success item of theMaybe
via a predicate function and emitting it if the predicate returnstrue
, completing otherwise.Filters the success item of theSingle
via a predicate function and emitting it if the predicate returnstrue
, completing otherwise.Flowable.firstElement()
Returns aMaybe
that emits only the very first item emitted by thisFlowable
or completes if thisFlowable
is empty.Observable.firstElement()
Returns aMaybe
that emits only the very first item emitted by the currentObservable
, or completes if the currentObservable
is empty.Maybe.flatMap
(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper) Returns aMaybe
that is based on applying a specified function to the item emitted by the currentMaybe
, where that function returns aMaybeSource
.Maybe.flatMap
(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> onSuccessMapper, @NonNull Function<? super Throwable, ? extends MaybeSource<? extends @NonNull R>> onErrorMapper, @NonNull Supplier<? extends MaybeSource<? extends @NonNull R>> onCompleteSupplier) Maps theonSuccess
,onError
oronComplete
signals of the currentMaybe
into aMaybeSource
and emits thatMaybeSource
's signals.Maybe.flatMap
(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull U>> mapper, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> combiner) Returns aMaybe
that emits the results of a specified function to the pair of values emitted by the currentMaybe
and a specified mappedMaybeSource
.Single.flatMapMaybe
(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper) Returns aMaybe
that is based on applying a specified function to the item emitted by the currentSingle
, where that function returns aMaybeSource
.Maybe.flatMapSingle
(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Returns aMaybe
based on applying a specified function to the item emitted by the currentMaybe
, where that function returns aSingle
.Maybe.fromAction
(@NonNull Action action) Returns aMaybe
instance that runs the givenAction
for eachMaybeObserver
and emits either its exception or simply completes.Maybe.fromCallable
(@NonNull Callable<? extends @Nullable T> callable) Returns aMaybe
that invokes the givenCallable
for each individualMaybeObserver
that subscribes and emits the resulting non-null
item viaonSuccess
while considering anull
result from theCallable
as indication for valueless completion viaonComplete
.Maybe.fromCompletable
(@NonNull CompletableSource completableSource) Wraps aCompletableSource
into aMaybe
.Maybe.fromCompletionStage
(@NonNull CompletionStage<@NonNull T> stage) Signals the completion value or error of the given (hot)CompletionStage
-based asynchronous calculation.Maybe.fromFuture
(@NonNull Future<? extends @NonNull T> future) Maybe.fromFuture
(@NonNull Future<? extends @NonNull T> future, long timeout, @NonNull TimeUnit unit) Maybe.fromObservable
(@NonNull ObservableSource<@NonNull T> source) Wraps anObservableSource
into aMaybe
and emits the very first item or completes if the source is empty.Maybe.fromOptional
(@NonNull Optional<@NonNull T> optional) Converts the existing value of the provided optional into ajust(Object)
or an empty optional into anempty()
Maybe
instance.Maybe.fromPublisher
(@NonNull org.reactivestreams.Publisher<@NonNull T> source) Wraps aPublisher
into aMaybe
and emits the very first item or completes if the source is empty.Maybe.fromRunnable
(@NonNull Runnable run) Returns aMaybe
instance that runs the givenRunnable
for eachMaybeObserver
and emits either its unchecked exception or simply completes.Maybe.fromSingle
(@NonNull SingleSource<@NonNull T> single) Wraps aSingleSource
into aMaybe
.Maybe.fromSupplier
(@NonNull Supplier<? extends @Nullable T> supplier) Returns aMaybe
that invokes the givenSupplier
for each individualMaybeObserver
that subscribes and emits the resulting non-null
item viaonSuccess
while considering anull
result from theSupplier
as indication for valueless completion viaonComplete
.Maybe.hide()
Hides the identity of thisMaybe
and itsDisposable
.Returns aMaybe
that emits a specified item.Flowable.lastElement()
Returns aMaybe
that emits the last item emitted by thisFlowable
or completes if thisFlowable
is empty.Observable.lastElement()
Returns aMaybe
that emits the last item emitted by the currentObservable
or completes if the currentObservable
is empty.This method requires advanced knowledge about building operators, please consider other standard composition methods first; Returns aMaybe
which, when subscribed to, invokes theapply(MaybeObserver)
method of the providedMaybeOperator
for each individual downstreamMaybe
and allows the insertion of a custom operator by accessing the downstream'sMaybeObserver
during this subscription phase and providing a newMaybeObserver
, containing the custom operator's intended business logic, that will be used in the subscription process going further upstream.Returns aMaybe
that applies a specified function to the item emitted by the currentMaybe
and emits the result of this function application.Maybe.mapOptional
(@NonNull Function<? super @NonNull T, @NonNull Optional<? extends @NonNull R>> mapper) Maps the upstream success value into anOptional
and emits the contained item if not empty.Single.mapOptional
(@NonNull Function<? super @NonNull T, @NonNull Optional<? extends @NonNull R>> mapper) Maybe.merge
(@NonNull MaybeSource<? extends MaybeSource<? extends @NonNull T>> source) Flattens aMaybeSource
that emits aMaybeSource
into a singleMaybeSource
that emits the item emitted by the nestedMaybeSource
, without any transformation.Maybe.never()
Returns aMaybe
that never sends any items or notifications to aMaybeObserver
.Wraps aMaybe
to emit its item (or notify of its error) on a specifiedScheduler
, asynchronously.Filters the items emitted by the currentMaybe
, only emitting its success value if that is an instance of the suppliedClass
.Filters the items emitted by the currentSingle
, only emitting its success value if that is an instance of the suppliedClass
.Maybe.onErrorComplete()
Returns aMaybe
instance that if thisMaybe
emits an error, it will emit anonComplete
and swallow the throwable.Maybe.onErrorComplete
(@NonNull Predicate<? super Throwable> predicate) Returns aMaybe
instance that if thisMaybe
emits an error and the predicate returnstrue
, it will emit anonComplete
and swallow the throwable.Single.onErrorComplete()
Returns aMaybe
instance that if the currentSingle
emits an error, it will emit anonComplete
and swallow the throwable.Single.onErrorComplete
(@NonNull Predicate<? super Throwable> predicate) Returns aMaybe
instance that if thisSingle
emits an error and the predicate returnstrue
, it will emit anonComplete
and swallow the throwable.Maybe.onErrorResumeNext
(@NonNull Function<? super Throwable, ? extends MaybeSource<? extends @NonNull T>> fallbackSupplier) Resumes the flow with aMaybeSource
returned for the failureThrowable
of the currentMaybe
by a function instead of signaling the error viaonError
.Maybe.onErrorResumeWith
(@NonNull MaybeSource<? extends @NonNull T> fallback) Resumes the flow with the givenMaybeSource
when the currentMaybe
fails instead of signaling the error viaonError
.Completable.onErrorReturn
(@NonNull Function<? super Throwable, ? extends @NonNull T> itemSupplier) Ends the flow with a success item returned by a function for theThrowable
error signaled by the currentCompletable
instead of signaling the error viaonError
.Ends the flow with a success item returned by a function for theThrowable
error signaled by the currentMaybe
instead of signaling the error viaonError
.Completable.onErrorReturnItem
(@NonNull T item) Ends the flow with the given success item when the currentCompletable
fails instead of signaling the error viaonError
.Maybe.onErrorReturnItem
(@NonNull T item) Ends the flow with the given success item when the currentMaybe
fails instead of signaling the error viaonError
.Maybe.onTerminateDetach()
Nulls out references to the upstream producer and downstreamMaybeObserver
if the sequence is terminated or downstream callsdispose()
.Returns aMaybe
that applies a specified accumulator function to the first item emitted by the currentFlowable
, 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
, and emits the final result from the final call to your function as its sole item.Returns aMaybe
that applies a specified accumulator function to the first item emitted by the currentObservable
, 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
, and emits the final result from the final call to your function as its sole item.Maybe.retry()
Returns aMaybe
that mirrors the currentMaybe
, resubscribing to it if it callsonError
(infinite retry count).Maybe.retry
(long times) Returns aMaybe
that mirrors the currentMaybe
, resubscribing to it if it callsonError
up to a specified number of retries.Retries at mosttimes
or until the predicate returnsfalse
, whichever happens first.Maybe.retry
(@NonNull BiPredicate<? super Integer, ? super Throwable> predicate) Returns aMaybe
that mirrors the currentMaybe
, resubscribing to it if it callsonError
and the predicate returnstrue
for that specific exception and retry count.Retries the currentMaybe
if it fails and the predicate returnstrue
.Maybe.retryUntil
(@NonNull BooleanSupplier stop) Retries until the given stop function returnstrue
.Maybe.retryWhen
(@NonNull Function<? super Flowable<Throwable>, @NonNull ? extends org.reactivestreams.Publisher<@NonNull ?>> handler) Returns aMaybe
that emits the same values as the currentMaybe
with the exception of anonError
.Flowable.singleElement()
Returns aMaybe
that completes if thisFlowable
is empty, signals one item if thisFlowable
signals exactly one item or signals anIllegalArgumentException
if thisFlowable
signals more than one item.Observable.singleElement()
Returns aMaybe
that completes if the currentObservable
is empty or emits the single item emitted by the currentObservable
, or signals anIllegalArgumentException
if the currentObservable
emits more than one item.Maybe.subscribeOn
(@NonNull Scheduler scheduler) Asynchronously subscribes subscribers to thisMaybe
on the specifiedScheduler
.Maybe.switchIfEmpty
(@NonNull MaybeSource<? extends @NonNull T> other) Returns aMaybe
that emits the items emitted by the currentMaybe
or the items of an alternateMaybeSource
if the currentMaybe
is empty.Maybe.takeUntil
(@NonNull MaybeSource<@NonNull U> other) Returns aMaybe
that emits the items emitted by the currentMaybe
until a secondMaybeSource
emits an item.Returns aMaybe
that emits the item emitted by the currentMaybe
until a secondPublisher
emits an item.Maybe.timeInterval()
Measures the time (in milliseconds) between the subscription and success item emission of the currentMaybe
and signals it as a tuple (Timed
) success value.Maybe.timeInterval
(@NonNull Scheduler scheduler) Measures the time (in milliseconds) between the subscription and success item emission of the currentMaybe
and signals it as a tuple (Timed
) success value.Maybe.timeInterval
(@NonNull TimeUnit unit) Measures the time between the subscription and success item emission of the currentMaybe
and signals it as a tuple (Timed
) success value.Maybe.timeInterval
(@NonNull TimeUnit unit, @NonNull Scheduler scheduler) Measures the time between the subscription and success item emission of the currentMaybe
and signals it as a tuple (Timed
) success value.Returns aMaybe
that mirrors the currentMaybe
but applies a timeout policy for each emitted item.Maybe.timeout
(long timeout, @NonNull TimeUnit unit, @NonNull MaybeSource<? extends @NonNull T> fallback) Returns aMaybe
that mirrors the currentMaybe
but applies a timeout policy for each emitted item.Returns aMaybe
that mirrors the currentMaybe
but applies a timeout policy for each emitted item, where this policy is governed on a specifiedScheduler
.Maybe.timeout
(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, @NonNull MaybeSource<? extends @NonNull T> fallback) Returns aMaybe
that mirrors the currentMaybe
but applies a timeout policy for each emitted item using a specifiedScheduler
.Maybe.timeout
(@NonNull MaybeSource<@NonNull U> timeoutIndicator) If the currentMaybe
didn't signal an event before thetimeoutIndicator
MaybeSource
signals, aTimeoutException
is signaled instead.Maybe.timeout
(@NonNull MaybeSource<@NonNull U> timeoutIndicator, @NonNull MaybeSource<? extends @NonNull T> fallback) If the currentMaybe
didn't signal an event before thetimeoutIndicator
MaybeSource
signals, the currentMaybe
is disposed and thefallback
MaybeSource
subscribed to as a continuation.If the currentMaybe
source didn't signal an event before thetimeoutIndicator
Publisher
signals, aTimeoutException
is signaled instead.Maybe.timeout
(@NonNull org.reactivestreams.Publisher<@NonNull U> timeoutIndicator, @NonNull MaybeSource<? extends @NonNull T> fallback) If the currentMaybe
didn't signal an event before thetimeoutIndicator
Publisher
signals, the currentMaybe
is disposed and thefallback
MaybeSource
subscribed to as a continuation.Returns aMaybe
that emits0L
after a specified delay.Maybe.timestamp()
Completable.toMaybe()
Converts thisCompletable
into aMaybe
.Single.toMaybe()
Converts thisSingle
into aMaybe
.Maybe.unsafeCreate
(@NonNull MaybeSource<@NonNull T> onSubscribe) Advanced use only: creates aMaybe
instance without any safeguards by using a callback that is called with aMaybeObserver
.Maybe.unsubscribeOn
(@NonNull Scheduler scheduler) Returns aMaybe
which makes sure when aMaybeObserver
disposes theDisposable
, that call is propagated up on the specifiedScheduler
.Maybe.using
(@NonNull Supplier<? extends @NonNull D> resourceSupplier, @NonNull Function<? super @NonNull D, ? extends MaybeSource<? extends @NonNull T>> sourceSupplier, @NonNull Consumer<? super @NonNull D> resourceCleanup) Constructs aMaybe
that creates a dependent resource object which is disposed of when the generatedMaybeSource
terminates or the downstream calls dispose().Maybe.using
(@NonNull Supplier<? extends @NonNull D> resourceSupplier, @NonNull Function<? super @NonNull D, ? extends MaybeSource<? extends @NonNull T>> sourceSupplier, @NonNull Consumer<? super @NonNull D> resourceCleanup, boolean eager) Constructs aMaybe
that creates a dependent resource object which is disposed first ({code eager == true}) when the generatedMaybeSource
terminates or the downstream disposes; or after ({code eager == false}).Maybe.wrap
(@NonNull MaybeSource<@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 Maybe<R> Maybe.zip
(@NonNull MaybeSource<? extends @NonNull T1> source1, @NonNull MaybeSource<? extends @NonNull T2> source2, @NonNull MaybeSource<? extends @NonNull T3> source3, @NonNull MaybeSource<? extends @NonNull T4> source4, @NonNull MaybeSource<? extends @NonNull T5> source5, @NonNull MaybeSource<? extends @NonNull T6> source6, @NonNull MaybeSource<? extends @NonNull T7> source7, @NonNull MaybeSource<? extends @NonNull T8> source8, @NonNull MaybeSource<? 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 aMaybe
that emits the results of a specified combiner function applied to combinations of nine items emitted, in sequence, by nine otherMaybeSource
s.static <@NonNull T1,
@NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull T8, @NonNull R>
@NonNull Maybe<R> Maybe.zip
(@NonNull MaybeSource<? extends @NonNull T1> source1, @NonNull MaybeSource<? extends @NonNull T2> source2, @NonNull MaybeSource<? extends @NonNull T3> source3, @NonNull MaybeSource<? extends @NonNull T4> source4, @NonNull MaybeSource<? extends @NonNull T5> source5, @NonNull MaybeSource<? extends @NonNull T6> source6, @NonNull MaybeSource<? extends @NonNull T7> source7, @NonNull MaybeSource<? 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 aMaybe
that emits the results of a specified combiner function applied to combinations of eight items emitted, in sequence, by eight otherMaybeSource
s.static <@NonNull T1,
@NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull R>
@NonNull Maybe<R> Maybe.zip
(@NonNull MaybeSource<? extends @NonNull T1> source1, @NonNull MaybeSource<? extends @NonNull T2> source2, @NonNull MaybeSource<? extends @NonNull T3> source3, @NonNull MaybeSource<? extends @NonNull T4> source4, @NonNull MaybeSource<? extends @NonNull T5> source5, @NonNull MaybeSource<? extends @NonNull T6> source6, @NonNull MaybeSource<? 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 aMaybe
that emits the results of a specified combiner function applied to combinations of seven items emitted, in sequence, by seven otherMaybeSource
s.static <@NonNull T1,
@NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull R>
@NonNull Maybe<R> Maybe.zip
(@NonNull MaybeSource<? extends @NonNull T1> source1, @NonNull MaybeSource<? extends @NonNull T2> source2, @NonNull MaybeSource<? extends @NonNull T3> source3, @NonNull MaybeSource<? extends @NonNull T4> source4, @NonNull MaybeSource<? extends @NonNull T5> source5, @NonNull MaybeSource<? 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 aMaybe
that emits the results of a specified combiner function applied to combinations of six items emitted, in sequence, by six otherMaybeSource
s.static <@NonNull T1,
@NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull R>
@NonNull Maybe<R> Maybe.zip
(@NonNull MaybeSource<? extends @NonNull T1> source1, @NonNull MaybeSource<? extends @NonNull T2> source2, @NonNull MaybeSource<? extends @NonNull T3> source3, @NonNull MaybeSource<? extends @NonNull T4> source4, @NonNull MaybeSource<? 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 aMaybe
that emits the results of a specified combiner function applied to combinations of five items emitted, in sequence, by five otherMaybeSource
s.Maybe.zip
(@NonNull MaybeSource<? extends @NonNull T1> source1, @NonNull MaybeSource<? extends @NonNull T2> source2, @NonNull MaybeSource<? extends @NonNull T3> source3, @NonNull MaybeSource<? extends @NonNull T4> source4, @NonNull Function4<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? extends @NonNull R> zipper) Returns aMaybe
that emits the results of a specified combiner function applied to combinations of four items emitted, in sequence, by four otherMaybeSource
s.Maybe.zip
(@NonNull MaybeSource<? extends @NonNull T1> source1, @NonNull MaybeSource<? extends @NonNull T2> source2, @NonNull MaybeSource<? extends @NonNull T3> source3, @NonNull Function3<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? extends @NonNull R> zipper) Returns aMaybe
that emits the results of a specified combiner function applied to combinations of three items emitted, in sequence, by three otherMaybeSource
s.Maybe.zip
(@NonNull MaybeSource<? extends @NonNull T1> source1, @NonNull MaybeSource<? extends @NonNull T2> source2, @NonNull BiFunction<? super @NonNull T1, ? super @NonNull T2, ? extends @NonNull R> zipper) Returns aMaybe
that emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two otherMaybeSource
s.Maybe.zip
(@NonNull Iterable<@NonNull ? extends MaybeSource<? extends @NonNull T>> sources, @NonNull Function<? super Object[], ? extends @NonNull R> zipper) Returns aMaybe
that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by anIterable
of otherMaybeSource
s.Maybe.zipArray
(@NonNull Function<? super Object[], ? extends @NonNull R> zipper, @NonNull MaybeSource<? extends @NonNull T>... sources) Returns aMaybe
that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an array of otherMaybeSource
s.Maybe.zipWith
(@NonNull MaybeSource<? extends @NonNull U> other, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> zipper) Waits until this and the otherMaybeSource
signal a success value then applies the givenBiFunction
to those values and emits theBiFunction
's resulting value to downstream.Methods in io.reactivex.rxjava3.core with parameters of type MaybeModifier and TypeMethodDescriptionApplies a function to the upstreamMaybe
and returns a converted value of typeR
.Applies a function to the upstreamMaybe
and returns aMaybeSource
with optionally different element type. -
Uses of Maybe in io.reactivex.rxjava3.internal.fuseable
Methods in io.reactivex.rxjava3.internal.fuseable that return MaybeModifier and TypeMethodDescriptionFuseToMaybe.fuseToMaybe()
Returns a (direct) Maybe for the operator. -
Uses of Maybe in io.reactivex.rxjava3.internal.jdk8
Subclasses of Maybe in io.reactivex.rxjava3.internal.jdk8Modifier and TypeClassDescriptionfinal class
Wrap a CompletionStage and signal its outcome.final class
MaybeMapOptional<T,
R> Maps the success value to anOptional
and emits its non-empty value or completes.final class
SingleMapOptional<T,
R> Maps the success value to anOptional
and emits its non-empty value or completes.Fields in io.reactivex.rxjava3.internal.jdk8 declared as MaybeModifier and TypeFieldDescriptionMaybeFlattenStreamAsFlowable.source
MaybeFlattenStreamAsObservable.source
MaybeMapOptional.source
Constructors in io.reactivex.rxjava3.internal.jdk8 with parameters of type Maybe -
Uses of Maybe in io.reactivex.rxjava3.internal.operators.completable
Subclasses of Maybe in io.reactivex.rxjava3.internal.operators.completableModifier and TypeClassDescriptionfinal class
Returns a value generated via a function if the main source signals an onError. -
Uses of Maybe in io.reactivex.rxjava3.internal.operators.flowable
Subclasses of Maybe in io.reactivex.rxjava3.internal.operators.flowableModifier and TypeClassDescriptionfinal class
final class
Emits the indexth element from a Publisher as a Maybe.final class
Consumes the source Publisher and emits its last item or completes.final class
Reduce a Flowable into a single value exposed as Single or signal NoSuchElementException.final class
-
Uses of Maybe in io.reactivex.rxjava3.internal.operators.maybe
Subclasses of Maybe in io.reactivex.rxjava3.internal.operators.maybeModifier and TypeClassDescription(package private) class
Abstract base class for intermediate Maybe operators that take an upstream MaybeSource.final class
MaybeAmb<T>
Signals the event of the first MaybeSource that signals.final class
MaybeCache<T>
Consumes the source once and replays its signal to any current or future MaybeObservers.final class
MaybeCreate<T>
Provides an API over MaybeObserver that serializes calls to onXXX and manages cancellation in a safe manner.final class
MaybeDefer<T>
Defers the creation of the actual Maybe the incoming MaybeObserver is subscribed to.final class
MaybeDelay<T>
Delays all signal types by the given amount and re-emits them on the given scheduler.final class
Delay the emission of the main signal until the other signals an item or completes.final class
Delay the subscription to the main Maybe until the other signals an item or completes.final class
final class
MaybeDematerialize<T,
R> Maps the success value of the source to a Notification, then maps it back to the corresponding signal type.final class
MaybeDetach<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
Execute an action after an onSuccess, onError, onComplete or a dispose event.final class
Calls a BiConsumer with the success, error values of the upstream Maybe or with two nulls if the Maybe completed.final class
Invokes callbacks upononSubscribe
from upstream anddispose
from downstream.final class
final class
Signals an onComplete.final class
MaybeError<T>
Signals a constant Throwable.final class
Signals a Throwable returned by a Supplier.final class
MaybeFilter<T>
Filters the upstream via a predicate, returning the success item or completing if the predicate returns false.final class
Filters the upstream SingleSource via a predicate, returning the success item or completing if the predicate returns false.final class
MaybeFlatMapBiSelector<T,
U, R> Maps a source item to another MaybeSource then calls a BiFunction with the original item and the secondary item to generate the final result.final class
Maps a value into a MaybeSource and relays its signal.final class
MaybeFlatMapSingle<T,
R> Maps the success value of the source MaybeSource into a Single.final class
MaybeFlatten<T,
R> Maps a value into a MaybeSource and relays its signal.final class
Executes an Action and signals its exception or completes normally.final class
Executes a callable and signals its value as success or signals an exception.final class
Wrap a Completable into a Maybe.final class
Waits until the source Future completes or the wait times out; treats anull
result as indication to signalonComplete
instead ofonSuccess
.final class
Executes an Runnable and signals its exception or completes normally.final class
Wrap a Single into a Maybe.final class
Executes a supplier and signals its value as success or signals an exception.final class
MaybeHide<T>
Hides the identity of the upstream Maybe and its Disposable sent through onSubscribe.final class
Turns an onSuccess into an onComplete, onError and onComplete is relayed as is.final class
MaybeIsEmpty<T>
Signals true if the source Maybe signals onComplete, signals false if the source Maybe signals onSuccess.final class
MaybeJust<T>
Signals a constant value.final class
MaybeLift<T,
R> Calls a MaybeOperator for the incoming MaybeObserver.final class
MaybeMap<T,
R> Maps the upstream success value into some other value.final class
Doesn't signal any event other than onSubscribe.final class
Signals the onSuccess, onError or onComplete events on a the specific scheduler.final class
Emits an onComplete if the source emits an onError and the predicate returns true for that Throwable.final class
Subscribes to the MaybeSource returned by a function if the main source signals an onError.final class
Returns a value generated via a function if the main source signals an onError.final class
MaybePeek<T>
Peeks into the lifecycle of a Maybe and MaybeObserver.final class
Subscribes to the upstream MaybeSource on the specified scheduler.final class
Subscribes to the other source if the main source is empty.final class
MaybeTakeUntilMaybe<T,
U> Relays the main source's event unless the other Maybe signals an item first or just completes at which point the resulting Maybe is completed.final class
Relays the main source's event unless the other Publisher signals an item first or just completes at which point the resulting Maybe is completed.final class
Measures the time between subscription and the success item emission from the upstream and emits this as aTimed
success value.final class
MaybeTimeoutMaybe<T,
U> Switches to the fallback Maybe if the other MaybeSource signals a success or completes, or signals TimeoutException if fallback is null.final class
Switches to the fallback Maybe if the other Publisher signals a success or completes, or signals TimeoutException if fallback is null.final class
Signals a0L
after the specified delay.final class
Wraps a MaybeSource without safeguard and calls its subscribe() method for each MaybeObserver.final class
Makes sure a dispose() call from downstream happens on the specified scheduler.final class
MaybeUsing<T,
D> Creates a resource and a dependent Maybe for each incoming Observer and optionally disposes the resource eagerly (before the terminal event is send out).final class
MaybeZipArray<T,
R> final class
MaybeZipIterable<T,
R> Fields in io.reactivex.rxjava3.internal.operators.maybe declared as MaybeMethods in io.reactivex.rxjava3.internal.operators.maybe that return MaybeModifier and TypeMethodDescriptionMaybeIgnoreElementCompletable.fuseToMaybe()
MaybeIsEmptySingle.fuseToMaybe()
Constructors in io.reactivex.rxjava3.internal.operators.maybe with parameters of type MaybeModifierConstructorDescriptionMaybeDematerialize
(Maybe<T> source, Function<? super T, Notification<R>> selector) MaybeDoOnLifecycle
(Maybe<T> upstream, Consumer<? super Disposable> onSubscribe, Action onDispose) MaybeMaterialize
(Maybe<T> source) -
Uses of Maybe in io.reactivex.rxjava3.internal.operators.observable
Subclasses of Maybe in io.reactivex.rxjava3.internal.operators.observableModifier and TypeClassDescriptionfinal 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 into a single value via an aggregator function and emit the final value or complete if the source is empty.final class
-
Uses of Maybe in io.reactivex.rxjava3.internal.operators.single
Subclasses of Maybe in io.reactivex.rxjava3.internal.operators.singleModifier and TypeClassDescriptionfinal class
SingleDematerialize<T,
R> Maps the success value of the source to a Notification, then maps it back to the corresponding signal type.final class
SingleFlatMapMaybe<T,
R> final class
Emits an onComplete if the source emits an onError and the predicate returns true for that Throwable. -
Uses of Maybe in io.reactivex.rxjava3.plugins
Fields in io.reactivex.rxjava3.plugins with type parameters of type MaybeModifier and TypeFieldDescriptionRxJavaPlugins.onMaybeAssembly
RxJavaPlugins.onMaybeAssembly
(package private) static @Nullable BiFunction
<? super Maybe, @NonNull ? super MaybeObserver, @NonNull ? extends MaybeObserver> RxJavaPlugins.onMaybeSubscribe
Methods in io.reactivex.rxjava3.plugins that return MaybeModifier and TypeMethodDescriptionRxJavaPlugins.onAssembly
(@NonNull Maybe<@NonNull T> source) Calls the associated hook function.Methods in io.reactivex.rxjava3.plugins that return types with arguments of type MaybeModifier and TypeMethodDescriptionRxJavaPlugins.getOnMaybeAssembly()
Returns the current hook function.RxJavaPlugins.getOnMaybeAssembly()
Returns the current hook function.static @Nullable BiFunction
<? super Maybe, @NonNull ? super MaybeObserver, @NonNull ? extends MaybeObserver> RxJavaPlugins.getOnMaybeSubscribe()
Returns the current hook function.Methods in io.reactivex.rxjava3.plugins with parameters of type MaybeModifier and TypeMethodDescriptionRxJavaPlugins.onAssembly
(@NonNull Maybe<@NonNull T> source) Calls the associated hook function.static <@NonNull T>
@NonNull MaybeObserver<? super T> RxJavaPlugins.onSubscribe
(@NonNull Maybe<@NonNull T> source, @NonNull MaybeObserver<? super @NonNull T> observer) Calls the associated hook function.Method parameters in io.reactivex.rxjava3.plugins with type arguments of type MaybeModifier and TypeMethodDescriptionstatic void
RxJavaPlugins.setOnMaybeAssembly
(@Nullable Function<? super Maybe, ? extends Maybe> onMaybeAssembly) Sets the specific hook function.static void
RxJavaPlugins.setOnMaybeAssembly
(@Nullable Function<? super Maybe, ? extends Maybe> onMaybeAssembly) Sets the specific hook function.static void
RxJavaPlugins.setOnMaybeSubscribe
(@Nullable BiFunction<? super Maybe, @NonNull MaybeObserver, @NonNull ? extends MaybeObserver> onMaybeSubscribe) Sets the specific hook function. -
Uses of Maybe in io.reactivex.rxjava3.subjects
Subclasses of Maybe in io.reactivex.rxjava3.subjectsModifier and TypeClassDescriptionfinal class
MaybeSubject<T>
Represents a hot Maybe-like source and consumer of events similar to Subjects.