static <@NonNull T> @NonNull Maybe<T> |
Maybe.amb(@NonNull java.lang.Iterable<? extends MaybeSource<? extends @NonNull T>> sources) |
Runs multiple MaybeSource s provided by an Iterable sequence and
signals the events of the first one that signals (disposing the rest).
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.ambArray(@NonNull MaybeSource<? extends @NonNull T>... sources) |
Runs multiple MaybeSource s and signals the events of the first one that signals (disposing
the rest).
|
@NonNull Maybe<T> |
Maybe.ambWith(@NonNull MaybeSource<? extends @NonNull T> other) |
Mirrors the MaybeSource (current or provided) that first signals an event.
|
<@NonNull T> @NonNull Maybe<T> |
Completable.andThen(@NonNull MaybeSource<@NonNull T> next) |
Returns a Maybe which will subscribe to this Completable and once that is completed then
will subscribe to the next MaybeSource .
|
@NonNull Maybe<T> |
Maybe.cache() |
Returns a Maybe that subscribes to this Maybe lazily, caches its event
and replays it, to all the downstream subscribers.
|
<@NonNull U> @NonNull Maybe<U> |
Maybe.cast(@NonNull java.lang.Class<? extends @NonNull U> clazz) |
Casts the success value of the current Maybe into the target type or signals a
ClassCastException if not compatible.
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.compose(@NonNull MaybeTransformer<? super @NonNull T,? extends @NonNull R> transformer) |
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.concatMap(@NonNull Function<? super @NonNull T,? extends MaybeSource<? extends @NonNull R>> mapper) |
Returns a Maybe that is based on applying a specified function to the item emitted by the current Maybe ,
where that function returns a MaybeSource .
|
<@NonNull R> @NonNull Maybe<R> |
Single.concatMapMaybe(@NonNull Function<? super @NonNull T,? extends MaybeSource<? extends @NonNull R>> mapper) |
Returns a Maybe that is based on applying a specified function to the item emitted by the current Single ,
where that function returns a MaybeSource .
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.concatMapSingle(@NonNull Function<? super @NonNull T,? extends SingleSource<? extends @NonNull R>> mapper) |
Returns a Maybe based on applying a specified function to the item emitted by the
current Maybe , where that function returns a Single .
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.create(@NonNull MaybeOnSubscribe<@NonNull T> onSubscribe) |
Provides an API (via a cold Maybe ) that bridges the reactive world with the callback-style world.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.defer(@NonNull Supplier<? extends @NonNull MaybeSource<? extends @NonNull T>> supplier) |
|
@NonNull Maybe<T> |
Maybe.delay(long time,
@NonNull java.util.concurrent.TimeUnit unit) |
Returns a Maybe that signals the events emitted by the current Maybe shifted forward in time by a
specified delay.
|
@NonNull Maybe<T> |
Maybe.delay(long time,
@NonNull java.util.concurrent.TimeUnit unit,
boolean delayError) |
Returns a Maybe that signals the events emitted by the current Maybe shifted forward in time by a
specified delay.
|
@NonNull Maybe<T> |
Maybe.delay(long time,
@NonNull java.util.concurrent.TimeUnit unit,
@NonNull Scheduler scheduler) |
Returns a Maybe that signals the events emitted by the current Maybe shifted forward in time by a
specified delay.
|
@NonNull Maybe<T> |
Maybe.delay(long time,
@NonNull java.util.concurrent.TimeUnit unit,
@NonNull Scheduler scheduler,
boolean delayError) |
Returns a Maybe that signals the events emitted by the current Maybe shifted forward in time by a
specified delay running on the specified Scheduler .
|
<@NonNull U> @NonNull Maybe<T> |
Maybe.delay(@NonNull org.reactivestreams.Publisher<@NonNull U> delayIndicator) |
Delays the emission of this Maybe until the given Publisher signals an item or completes.
|
@NonNull Maybe<T> |
Maybe.delaySubscription(long time,
@NonNull java.util.concurrent.TimeUnit unit) |
Returns a Maybe that delays the subscription to the current Maybe by a given amount of time.
|
@NonNull Maybe<T> |
Maybe.delaySubscription(long time,
@NonNull java.util.concurrent.TimeUnit unit,
@NonNull Scheduler scheduler) |
Returns a Maybe that delays the subscription to the current Maybe by a given amount of time,
both waiting and subscribing on a given Scheduler .
|
<@NonNull U> @NonNull Maybe<T> |
Maybe.delaySubscription(@NonNull org.reactivestreams.Publisher<@NonNull U> subscriptionIndicator) |
Returns a Maybe that delays the subscription to this Maybe
until the other Publisher emits an element or completes normally.
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.dematerialize(@NonNull Function<? super @NonNull T,@NonNull Notification<@NonNull R>> selector) |
Maps the Notification success value of the current Maybe back into normal
onSuccess , onError or onComplete signals.
|
<@NonNull R> @NonNull Maybe<R> |
Single.dematerialize(@NonNull Function<? super @NonNull T,@NonNull Notification<@NonNull R>> selector) |
Maps the Notification success value of the current Single back into normal
onSuccess , onError or onComplete signals as a
Maybe source.
|
@NonNull Maybe<T> |
Maybe.doAfterSuccess(@NonNull Consumer<? super @NonNull T> onAfterSuccess) |
Calls the specified Consumer with the success item after this item has been emitted to the downstream.
|
@NonNull Maybe<T> |
Maybe.doAfterTerminate(@NonNull Action onAfterTerminate) |
|
@NonNull Maybe<T> |
Maybe.doFinally(@NonNull Action onFinally) |
Calls the specified action after this Maybe signals onSuccess , onError or onComplete or gets disposed by
the downstream.
|
@NonNull Maybe<T> |
Maybe.doOnComplete(@NonNull Action onComplete) |
Invokes an Action just before the current Maybe calls onComplete .
|
@NonNull Maybe<T> |
Maybe.doOnDispose(@NonNull Action onDispose) |
|
@NonNull Maybe<T> |
Maybe.doOnError(@NonNull Consumer<? super java.lang.Throwable> onError) |
Calls the shared Consumer with the error sent via onError for each
MaybeObserver that subscribes to the current Maybe .
|
@NonNull Maybe<T> |
Maybe.doOnEvent(@NonNull BiConsumer<? super @NonNull T,? super java.lang.Throwable> onEvent) |
Calls the given onEvent callback with the (success value, null ) for an onSuccess , (null , throwable) for
an onError or (null , null ) for an onComplete signal from this Maybe before delivering said
signal to the downstream.
|
@NonNull Maybe<T> |
Maybe.doOnLifecycle(@NonNull Consumer<? super Disposable> onSubscribe,
@NonNull Action onDispose) |
Calls the appropriate onXXX method (shared between all MaybeObserver s) for the lifecycle events of
the sequence (subscription, disposal).
|
@NonNull Maybe<T> |
Maybe.doOnSubscribe(@NonNull Consumer<? super Disposable> onSubscribe) |
|
@NonNull Maybe<T> |
Maybe.doOnSuccess(@NonNull Consumer<? super @NonNull T> onSuccess) |
Calls the shared Consumer with the success value sent via onSuccess for each
MaybeObserver that subscribes to the current Maybe .
|
@NonNull Maybe<T> |
Maybe.doOnTerminate(@NonNull Action onTerminate) |
Returns a Maybe instance that calls the given onTerminate callback
just before this Maybe completes normally or with an exception.
|
@NonNull Maybe<T> |
Flowable.elementAt(long index) |
Returns a Maybe that emits the single item at a specified index in a sequence of emissions from
this Flowable or completes if this Flowable sequence has fewer elements than index.
|
@NonNull Maybe<T> |
Observable.elementAt(long index) |
Returns a Maybe that emits the single item at a specified index in a sequence of emissions from
the current Observable or completes if the current Observable signals fewer elements than index.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.empty() |
Returns a (singleton) Maybe instance that calls onComplete
immediately.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.error(@NonNull Supplier<? extends @NonNull java.lang.Throwable> supplier) |
Returns a Maybe that invokes a MaybeObserver 's onError method when the
MaybeObserver subscribes to it.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.error(@NonNull java.lang.Throwable throwable) |
Returns a Maybe that invokes a subscriber's onError method when the
subscriber subscribes to it.
|
@NonNull Maybe<T> |
Maybe.filter(@NonNull Predicate<? super @NonNull T> predicate) |
Filters the success item of the Maybe via a predicate function and emitting it if the predicate
returns true , completing otherwise.
|
@NonNull Maybe<T> |
Single.filter(@NonNull Predicate<? super @NonNull T> predicate) |
Filters the success item of the Single via a predicate function and emitting it if the predicate
returns true , completing otherwise.
|
@NonNull Maybe<T> |
Flowable.firstElement() |
Returns a Maybe that emits only the very first item emitted by this Flowable or
completes if this Flowable is empty.
|
@NonNull Maybe<T> |
Observable.firstElement() |
Returns a Maybe that emits only the very first item emitted by the current Observable , or
completes if the current Observable is empty.
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.flatMap(@NonNull Function<? super @NonNull T,? extends MaybeSource<? extends @NonNull R>> mapper) |
Returns a Maybe that is based on applying a specified function to the item emitted by the current Maybe ,
where that function returns a MaybeSource .
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.flatMap(@NonNull Function<? super @NonNull T,? extends MaybeSource<? extends @NonNull R>> onSuccessMapper,
@NonNull Function<? super java.lang.Throwable,? extends MaybeSource<? extends @NonNull R>> onErrorMapper,
@NonNull Supplier<? extends MaybeSource<? extends @NonNull R>> onCompleteSupplier) |
Maps the onSuccess , onError or onComplete signals of the current Maybe into a MaybeSource and emits that
MaybeSource 's signals.
|
<@NonNull U,@NonNull R> @NonNull Maybe<R> |
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 a Maybe that emits the results of a specified function to the pair of values emitted by the
current Maybe and a specified mapped MaybeSource .
|
<@NonNull R> @NonNull Maybe<R> |
Single.flatMapMaybe(@NonNull Function<? super @NonNull T,? extends MaybeSource<? extends @NonNull R>> mapper) |
Returns a Maybe that is based on applying a specified function to the item emitted by the current Single ,
where that function returns a MaybeSource .
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.flatMapSingle(@NonNull Function<? super @NonNull T,? extends SingleSource<? extends @NonNull R>> mapper) |
Returns a Maybe based on applying a specified function to the item emitted by the
current Maybe , where that function returns a Single .
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.fromAction(@NonNull Action action) |
Returns a Maybe instance that runs the given Action for each MaybeObserver and
emits either its exception or simply completes.
|
static <T> @NonNull Maybe<@NonNull T> |
Maybe.fromCallable(@NonNull java.util.concurrent.Callable<? extends @Nullable T> callable) |
Returns a Maybe that invokes the given Callable for each individual MaybeObserver that
subscribes and emits the resulting non- null item via onSuccess while
considering a null result from the Callable as indication for valueless completion
via onComplete .
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.fromCompletable(@NonNull CompletableSource completableSource) |
|
static <@NonNull T> @NonNull Maybe<@NonNull T> |
Maybe.fromCompletionStage(@NonNull java.util.concurrent.CompletionStage<@NonNull T> stage) |
Signals the completion value or error of the given (hot) CompletionStage -based asynchronous calculation.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.fromFuture(@NonNull java.util.concurrent.Future<? extends @NonNull T> future) |
Converts a Future into a Maybe , treating a null result as an indication of emptiness.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.fromFuture(@NonNull java.util.concurrent.Future<? extends @NonNull T> future,
long timeout,
@NonNull java.util.concurrent.TimeUnit unit) |
Converts a Future into a Maybe , with a timeout on the Future .
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.fromObservable(@NonNull ObservableSource<@NonNull T> source) |
Wraps an ObservableSource into a Maybe and emits the very first item
or completes if the source is empty.
|
static <@NonNull T> @NonNull Maybe<@NonNull T> |
Maybe.fromOptional(@NonNull java.util.Optional<@NonNull T> optional) |
Converts the existing value of the provided optional into a just(Object)
or an empty optional into an empty() Maybe instance.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.fromPublisher(@NonNull org.reactivestreams.Publisher<@NonNull T> source) |
Wraps a Publisher into a Maybe and emits the very first item
or completes if the source is empty.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.fromRunnable(@NonNull java.lang.Runnable run) |
Returns a Maybe instance that runs the given Runnable for each MaybeObserver and
emits either its unchecked exception or simply completes.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.fromSingle(@NonNull SingleSource<@NonNull T> single) |
|
static <T> @NonNull Maybe<@NonNull T> |
Maybe.fromSupplier(@NonNull Supplier<? extends @Nullable T> supplier) |
Returns a Maybe that invokes the given Supplier for each individual MaybeObserver that
subscribes and emits the resulting non- null item via onSuccess while
considering a null result from the Supplier as indication for valueless completion
via onComplete .
|
@NonNull Maybe<T> |
Maybe.hide() |
Hides the identity of this Maybe and its Disposable .
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.just(@NonNull T item) |
Returns a Maybe that emits a specified item.
|
@NonNull Maybe<T> |
Flowable.lastElement() |
Returns a Maybe that emits the last item emitted by this Flowable or completes if
this Flowable is empty.
|
@NonNull Maybe<T> |
Observable.lastElement() |
Returns a Maybe that emits the last item emitted by the current Observable or
completes if the current Observable is empty.
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.lift(@NonNull MaybeOperator<? extends @NonNull R,? super @NonNull T> lift) |
This method requires advanced knowledge about building operators, please consider
other standard composition methods first;
Returns a Maybe which, when subscribed to, invokes the apply(MaybeObserver) method
of the provided MaybeOperator for each individual downstream Maybe and allows the
insertion of a custom operator by accessing the downstream's MaybeObserver during this subscription phase
and providing a new MaybeObserver , containing the custom operator's intended business logic, that will be
used in the subscription process going further upstream.
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.map(@NonNull Function<? super @NonNull T,? extends @NonNull R> mapper) |
Returns a Maybe that applies a specified function to the item emitted by the current Maybe and
emits the result of this function application.
|
<@NonNull R> @NonNull Maybe<R> |
Maybe.mapOptional(@NonNull Function<? super @NonNull T,@NonNull java.util.Optional<? extends @NonNull R>> mapper) |
Maps the upstream success value into an Optional and emits the contained item if not empty.
|
<@NonNull R> @NonNull Maybe<R> |
Single.mapOptional(@NonNull Function<? super @NonNull T,@NonNull java.util.Optional<? extends @NonNull R>> mapper) |
Maps the upstream success value into an Optional and emits the contained item if not empty as a Maybe .
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.merge(@NonNull MaybeSource<? extends MaybeSource<? extends @NonNull T>> source) |
Flattens a MaybeSource that emits a MaybeSource into a single MaybeSource that emits the item
emitted by the nested MaybeSource , without any transformation.
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.never() |
Returns a Maybe that never sends any items or notifications to a MaybeObserver .
|
@NonNull Maybe<T> |
Maybe.observeOn(@NonNull Scheduler scheduler) |
Wraps a Maybe to emit its item (or notify of its error) on a specified Scheduler ,
asynchronously.
|
<@NonNull U> @NonNull Maybe<U> |
Maybe.ofType(@NonNull java.lang.Class<@NonNull U> clazz) |
Filters the items emitted by the current Maybe , only emitting its success value if that
is an instance of the supplied Class .
|
<@NonNull U> @NonNull Maybe<U> |
Single.ofType(@NonNull java.lang.Class<@NonNull U> clazz) |
Filters the items emitted by the current Single , only emitting its success value if that
is an instance of the supplied Class .
|
@NonNull Maybe<T> |
Maybe.onErrorComplete() |
Returns a Maybe instance that if this Maybe emits an error, it will emit an onComplete
and swallow the throwable.
|
@NonNull Maybe<T> |
Maybe.onErrorComplete(@NonNull Predicate<? super java.lang.Throwable> predicate) |
Returns a Maybe instance that if this Maybe emits an error and the predicate returns
true , it will emit an onComplete and swallow the throwable.
|
@NonNull Maybe<T> |
Single.onErrorComplete() |
Returns a Maybe instance that if the current Single emits an error, it will emit an onComplete
and swallow the throwable.
|
@NonNull Maybe<T> |
Single.onErrorComplete(@NonNull Predicate<? super java.lang.Throwable> predicate) |
Returns a Maybe instance that if this Single emits an error and the predicate returns
true , it will emit an onComplete and swallow the throwable.
|
@NonNull Maybe<T> |
Maybe.onErrorResumeNext(@NonNull Function<? super java.lang.Throwable,? extends MaybeSource<? extends @NonNull T>> fallbackSupplier) |
Resumes the flow with a MaybeSource returned for the failure Throwable of the current Maybe by a
function instead of signaling the error via onError .
|
@NonNull Maybe<T> |
Maybe.onErrorResumeWith(@NonNull MaybeSource<? extends @NonNull T> fallback) |
Resumes the flow with the given MaybeSource when the current Maybe fails instead of
signaling the error via onError .
|
<@NonNull T> @NonNull Maybe<T> |
Completable.onErrorReturn(@NonNull Function<? super java.lang.Throwable,? extends @NonNull T> itemSupplier) |
Ends the flow with a success item returned by a function for the Throwable error signaled by the current
Completable instead of signaling the error via onError .
|
@NonNull Maybe<T> |
Maybe.onErrorReturn(@NonNull Function<? super java.lang.Throwable,? extends @NonNull T> itemSupplier) |
Ends the flow with a success item returned by a function for the Throwable error signaled by the current
Maybe instead of signaling the error via onError .
|
<@NonNull T> @NonNull Maybe<T> |
Completable.onErrorReturnItem(@NonNull T item) |
Ends the flow with the given success item when the current Completable
fails instead of signaling the error via onError .
|
@NonNull Maybe<T> |
Maybe.onErrorReturnItem(@NonNull T item) |
Ends the flow with the given success item when the current Maybe fails instead of signaling the error via onError .
|
@NonNull Maybe<T> |
Maybe.onTerminateDetach() |
Nulls out references to the upstream producer and downstream MaybeObserver if
the sequence is terminated or downstream calls dispose() .
|
@NonNull Maybe<T> |
Flowable.reduce(@NonNull BiFunction<@NonNull T,@NonNull T,@NonNull T> reducer) |
Returns a Maybe that applies a specified accumulator function to the first item emitted by the current
Flowable , then feeds the result of that function along with the second item emitted by the current
Flowable into the same function, and so on until all items have been emitted by the current and finite Flowable ,
and emits the final result from the final call to your function as its sole item.
|
@NonNull Maybe<T> |
Observable.reduce(@NonNull BiFunction<@NonNull T,@NonNull T,@NonNull T> reducer) |
Returns a Maybe that applies a specified accumulator function to the first item emitted by the current
Observable , then feeds the result of that function along with the second item emitted by the current
Observable into the same function, and so on until all items have been emitted by the current and finite Observable ,
and emits the final result from the final call to your function as its sole item.
|
@NonNull Maybe<T> |
Maybe.retry() |
Returns a Maybe that mirrors the current Maybe , resubscribing to it if it calls onError
(infinite retry count).
|
@NonNull Maybe<T> |
Maybe.retry(long times) |
Returns a Maybe that mirrors the current Maybe , resubscribing to it if it calls onError
up to a specified number of retries.
|
@NonNull Maybe<T> |
Maybe.retry(long times,
@NonNull Predicate<? super java.lang.Throwable> predicate) |
Retries at most times or until the predicate returns false , whichever happens first.
|
@NonNull Maybe<T> |
Maybe.retry(@NonNull BiPredicate<? super java.lang.Integer,? super java.lang.Throwable> predicate) |
Returns a Maybe that mirrors the current Maybe , resubscribing to it if it calls onError
and the predicate returns true for that specific exception and retry count.
|
@NonNull Maybe<T> |
Maybe.retry(@NonNull Predicate<? super java.lang.Throwable> predicate) |
Retries the current Maybe if it fails and the predicate returns true .
|
@NonNull Maybe<T> |
Maybe.retryUntil(@NonNull BooleanSupplier stop) |
Retries until the given stop function returns true .
|
@NonNull Maybe<T> |
Maybe.retryWhen(@NonNull Function<? super Flowable<java.lang.Throwable>,? extends org.reactivestreams.Publisher<?>> handler) |
Returns a Maybe that emits the same values as the current Maybe with the exception of an
onError .
|
@NonNull Maybe<T> |
Flowable.singleElement() |
Returns a Maybe that completes if this Flowable is empty, signals one item if this Flowable
signals exactly one item or signals an IllegalArgumentException if this Flowable signals
more than one item.
|
@NonNull Maybe<T> |
Observable.singleElement() |
Returns a Maybe that completes if the current Observable is empty or emits the single item
emitted by the current Observable , or signals an IllegalArgumentException if the current
Observable emits more than one item.
|
@NonNull Maybe<T> |
Maybe.subscribeOn(@NonNull Scheduler scheduler) |
Asynchronously subscribes subscribers to this Maybe on the specified Scheduler .
|
@NonNull Maybe<T> |
Maybe.switchIfEmpty(@NonNull MaybeSource<? extends @NonNull T> other) |
Returns a Maybe that emits the items emitted by the current Maybe or the items of an alternate
MaybeSource if the current Maybe is empty.
|
<@NonNull U> @NonNull Maybe<T> |
Maybe.takeUntil(@NonNull MaybeSource<@NonNull U> other) |
Returns a Maybe that emits the items emitted by the current Maybe until a second MaybeSource
emits an item.
|
<@NonNull U> @NonNull Maybe<T> |
Maybe.takeUntil(@NonNull org.reactivestreams.Publisher<@NonNull U> other) |
Returns a Maybe that emits the item emitted by the current Maybe until a second Publisher
emits an item.
|
@NonNull Maybe<Timed<T>> |
Maybe.timeInterval() |
Measures the time (in milliseconds) between the subscription and success item emission
of the current Maybe and signals it as a tuple ( Timed )
success value.
|
@NonNull Maybe<Timed<T>> |
Maybe.timeInterval(@NonNull Scheduler scheduler) |
Measures the time (in milliseconds) between the subscription and success item emission
of the current Maybe and signals it as a tuple ( Timed )
success value.
|
@NonNull Maybe<Timed<T>> |
Maybe.timeInterval(@NonNull java.util.concurrent.TimeUnit unit) |
Measures the time between the subscription and success item emission
of the current Maybe and signals it as a tuple ( Timed )
success value.
|
@NonNull Maybe<Timed<T>> |
Maybe.timeInterval(@NonNull java.util.concurrent.TimeUnit unit,
@NonNull Scheduler scheduler) |
Measures the time between the subscription and success item emission
of the current Maybe and signals it as a tuple ( Timed )
success value.
|
@NonNull Maybe<T> |
Maybe.timeout(long timeout,
@NonNull java.util.concurrent.TimeUnit unit) |
Returns a Maybe that mirrors the current Maybe but applies a timeout policy for each emitted
item.
|
@NonNull Maybe<T> |
Maybe.timeout(long timeout,
@NonNull java.util.concurrent.TimeUnit unit,
@NonNull MaybeSource<? extends @NonNull T> fallback) |
Returns a Maybe that mirrors the current Maybe but applies a timeout policy for each emitted
item.
|
@NonNull Maybe<T> |
Maybe.timeout(long timeout,
@NonNull java.util.concurrent.TimeUnit unit,
@NonNull Scheduler scheduler) |
Returns a Maybe that mirrors the current Maybe but applies a timeout policy for each emitted
item, where this policy is governed on a specified Scheduler .
|
@NonNull Maybe<T> |
Maybe.timeout(long timeout,
@NonNull java.util.concurrent.TimeUnit unit,
@NonNull Scheduler scheduler,
@NonNull MaybeSource<? extends @NonNull T> fallback) |
Returns a Maybe that mirrors the current Maybe but applies a timeout policy for each emitted
item using a specified Scheduler .
|
<@NonNull U> @NonNull Maybe<T> |
Maybe.timeout(@NonNull MaybeSource<@NonNull U> timeoutIndicator) |
If the current Maybe didn't signal an event before the timeoutIndicator MaybeSource signals, a
TimeoutException is signaled instead.
|
<@NonNull U> @NonNull Maybe<T> |
Maybe.timeout(@NonNull MaybeSource<@NonNull U> timeoutIndicator,
@NonNull MaybeSource<? extends @NonNull T> fallback) |
If the current Maybe didn't signal an event before the timeoutIndicator MaybeSource signals,
the current Maybe is disposed and the fallback MaybeSource subscribed to
as a continuation.
|
<@NonNull U> @NonNull Maybe<T> |
Maybe.timeout(@NonNull org.reactivestreams.Publisher<@NonNull U> timeoutIndicator) |
If the current Maybe source didn't signal an event before the timeoutIndicator Publisher signals, a
TimeoutException is signaled instead.
|
<@NonNull U> @NonNull Maybe<T> |
Maybe.timeout(@NonNull org.reactivestreams.Publisher<@NonNull U> timeoutIndicator,
@NonNull MaybeSource<? extends @NonNull T> fallback) |
If the current Maybe didn't signal an event before the timeoutIndicator Publisher signals,
the current Maybe is disposed and the fallback MaybeSource subscribed to
as a continuation.
|
static @NonNull Maybe<java.lang.Long> |
Maybe.timer(long delay,
@NonNull java.util.concurrent.TimeUnit unit) |
Returns a Maybe that emits 0L after a specified delay.
|
static @NonNull Maybe<java.lang.Long> |
Maybe.timer(long delay,
@NonNull java.util.concurrent.TimeUnit unit,
@NonNull Scheduler scheduler) |
Returns a Maybe that emits 0L after a specified delay on a specified Scheduler .
|
@NonNull Maybe<Timed<T>> |
Maybe.timestamp() |
Combines the success value from the current Maybe with the current time (in milliseconds) of
its reception, using the computation Scheduler as time source,
then signals them as a Timed instance.
|
@NonNull Maybe<Timed<T>> |
Maybe.timestamp(@NonNull Scheduler scheduler) |
Combines the success value from the current Maybe with the current time (in milliseconds) of
its reception, using the given Scheduler as time source,
then signals them as a Timed instance.
|
@NonNull Maybe<Timed<T>> |
Maybe.timestamp(@NonNull java.util.concurrent.TimeUnit unit) |
Combines the success value from the current Maybe with the current time of
its reception, using the computation Scheduler as time source,
then signals it as a Timed instance.
|
@NonNull Maybe<Timed<T>> |
Maybe.timestamp(@NonNull java.util.concurrent.TimeUnit unit,
@NonNull Scheduler scheduler) |
Combines the success value from the current Maybe with the current time of
its reception, using the given Scheduler as time source,
then signals it as a Timed instance.
|
<@NonNull T> @NonNull Maybe<T> |
Completable.toMaybe() |
Converts this Completable into a Maybe .
|
@NonNull Maybe<T> |
Single.toMaybe() |
Converts this Single into a Maybe .
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.unsafeCreate(@NonNull MaybeSource<@NonNull T> onSubscribe) |
Advanced use only: creates a Maybe instance without
any safeguards by using a callback that is called with a MaybeObserver .
|
@NonNull Maybe<T> |
Maybe.unsubscribeOn(@NonNull Scheduler scheduler) |
|
static <@NonNull T,@NonNull D> @NonNull Maybe<T> |
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 a Maybe that creates a dependent resource object which is disposed of when the
generated MaybeSource terminates or the downstream calls dispose().
|
static <@NonNull T,@NonNull D> @NonNull Maybe<T> |
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 a Maybe that creates a dependent resource object which is disposed first ({code eager == true})
when the generated MaybeSource terminates or the downstream disposes; or after ({code eager == false}).
|
static <@NonNull T> @NonNull Maybe<T> |
Maybe.wrap(@NonNull MaybeSource<@NonNull T> source) |
Wraps a MaybeSource instance into a new Maybe instance if not already a Maybe
instance.
|
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 a Maybe that emits the results of a specified combiner function applied to combinations of
nine items emitted, in sequence, by nine other MaybeSource 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 a Maybe that emits the results of a specified combiner function applied to combinations of
eight items emitted, in sequence, by eight other MaybeSource 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 a Maybe that emits the results of a specified combiner function applied to combinations of
seven items emitted, in sequence, by seven other MaybeSource 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 a Maybe that emits the results of a specified combiner function applied to combinations of
six items emitted, in sequence, by six other MaybeSource 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 a Maybe that emits the results of a specified combiner function applied to combinations of
five items emitted, in sequence, by five other MaybeSource s.
|
static <@NonNull T1,@NonNull T2,@NonNull T3,@NonNull T4,@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 Function4<? super @NonNull T1,? super @NonNull T2,? super @NonNull T3,? super @NonNull T4,? extends @NonNull R> zipper) |
Returns a Maybe that emits the results of a specified combiner function applied to combinations of
four items emitted, in sequence, by four other MaybeSource s.
|
static <@NonNull T1,@NonNull T2,@NonNull T3,@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 Function3<? super @NonNull T1,? super @NonNull T2,? super @NonNull T3,? extends @NonNull R> zipper) |
Returns a Maybe that emits the results of a specified combiner function applied to combinations of
three items emitted, in sequence, by three other MaybeSource s.
|
static <@NonNull T1,@NonNull T2,@NonNull R> @NonNull Maybe<R> |
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 a Maybe that emits the results of a specified combiner function applied to combinations of
two items emitted, in sequence, by two other MaybeSource s.
|
static <@NonNull T,@NonNull R> @NonNull Maybe<R> |
Maybe.zip(@NonNull java.lang.Iterable<? extends MaybeSource<? extends @NonNull T>> sources,
@NonNull Function<? super java.lang.Object[],? extends @NonNull R> zipper) |
Returns a Maybe that emits the results of a specified combiner function applied to combinations of
items emitted, in sequence, by an Iterable of other MaybeSource s.
|
static <@NonNull T,@NonNull R> @NonNull Maybe<R> |
Maybe.zipArray(@NonNull Function<? super java.lang.Object[],? extends @NonNull R> zipper,
@NonNull MaybeSource<? extends @NonNull T>... sources) |
Returns a Maybe that emits the results of a specified combiner function applied to combinations of
items emitted, in sequence, by an array of other MaybeSource s.
|
<@NonNull U,@NonNull R> @NonNull Maybe<R> |
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 other MaybeSource signal a success value then applies the given BiFunction
to those values and emits the BiFunction 's resulting value to downstream.
|