static
<T>
Maybe<T>
|
amb(Iterable<? extends MaybeSource<? extends T>> sources)
Runs multiple Maybe sources and signals the events of the first one that signals (cancelling
the rest).
|
static
<T>
Maybe<T>
|
ambArray(MaybeSource...<? extends T> sources)
Runs multiple Maybe sources and signals the events of the first one that signals (cancelling
the rest).
|
final
Maybe<T>
|
ambWith(MaybeSource<? extends T> other)
Mirrors the MaybeSource (current or provided) that first signals an event.
|
final
T
|
blockingGet(T defaultValue)
Waits in a blocking fashion until the current Maybe signals a success value (which is returned),
defaultValue if completed or an exception (which is propagated).
|
final
T
|
blockingGet()
Waits in a blocking fashion until the current Maybe signals a success value (which is returned),
null if completed or an exception (which is propagated).
|
final
Maybe<T>
|
cache()
Returns a Maybe that subscribes to this Maybe lazily, caches its event
and replays it, to all the downstream subscribers.
|
final
<U>
Maybe<U>
|
cast(Class<? extends U> clazz)
Casts the success value of the current Maybe into the target type or signals a
ClassCastException if not compatible.
|
final
<R>
Maybe<R>
|
compose(MaybeTransformer<? super T, ? extends R> transformer)
Transform a Maybe by applying a particular Transformer function to it.
|
static
<T>
Flowable<T>
|
concat(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2)
Returns a Flowable that emits the items emitted by two MaybeSources, one after the other.
|
static
<T>
Flowable<T>
|
concat(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2, MaybeSource<? extends T> source3)
Returns a Flowable that emits the items emitted by three MaybeSources, one after the other.
|
static
<T>
Flowable<T>
|
concat(Iterable<? extends MaybeSource<? extends T>> sources)
Concatenate the single values, in a non-overlapping fashion, of the MaybeSource sources provided by
an Iterable sequence.
|
static
<T>
Flowable<T>
|
concat(Publisher<? extends MaybeSource<? extends T>> sources)
Concatenate the single values, in a non-overlapping fashion, of the MaybeSource sources provided by
a Publisher sequence.
|
static
<T>
Flowable<T>
|
concat(Publisher<? extends MaybeSource<? extends T>> sources, int prefetch)
Concatenate the single values, in a non-overlapping fashion, of the MaybeSource sources provided by
a Publisher sequence.
|
static
<T>
Flowable<T>
|
concat(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2, MaybeSource<? extends T> source3, MaybeSource<? extends T> source4)
Returns a Flowable that emits the items emitted by four MaybeSources, one after the other.
|
static
<T>
Flowable<T>
|
concatArray(MaybeSource...<? extends T> sources)
Concatenate the single values, in a non-overlapping fashion, of the MaybeSource sources in the array.
|
static
<T>
Flowable<T>
|
concatArrayDelayError(MaybeSource...<? extends T> sources)
Concatenates a variable number of MaybeSource sources and delays errors from any of them
till all terminate.
|
static
<T>
Flowable<T>
|
concatArrayEager(MaybeSource...<? extends T> sources)
Concatenates a sequence of MaybeSource eagerly into a single stream of values.
|
static
<T>
Flowable<T>
|
concatDelayError(Publisher<? extends MaybeSource<? extends T>> sources)
Concatenates the Publisher sequence of Publishers into a single sequence by subscribing to each inner Publisher,
one after the other, one at a time and delays any errors till the all inner and the outer Publishers terminate.
|
static
<T>
Flowable<T>
|
concatDelayError(Iterable<? extends MaybeSource<? extends T>> sources)
Concatenates the Iterable sequence of MaybeSources into a single sequence by subscribing to each MaybeSource,
one after the other, one at a time and delays any errors till the all inner MaybeSources terminate.
|
static
<T>
Flowable<T>
|
concatEager(Iterable<? extends MaybeSource<? extends T>> sources)
Concatenates a sequence of MaybeSources eagerly into a single stream of values.
|
static
<T>
Flowable<T>
|
concatEager(Publisher<? extends MaybeSource<? extends T>> sources)
Concatenates a Publisher sequence of Publishers eagerly into a single stream of values.
|
final
<R>
Maybe<R>
|
concatMap(Function<? super T, ? extends MaybeSource<? extends R>> mapper)
Returns a Maybe that is based on applying a specified function to the item emitted by the source Maybe,
where that function returns a MaybeSource.
|
final
Flowable<T>
|
concatWith(MaybeSource<? extends T> other)
Returns a Flowable that emits the items emitted from the current MaybeSource, then the next, one after
the other, without interleaving them.
|
final
Single<Boolean>
|
contains(Object item)
Returns a Single that emits a Boolean that indicates whether the source Maybe emitted a
specified item.
|
final
Single<Long>
|
count()
Returns a Maybe that counts the total number of items emitted (0 or 1) by the source Maybe and emits
this count as a 64-bit Long.
|
static
<T>
Maybe<T>
|
create(MaybeOnSubscribe<T> onSubscribe)
Provides an API (via a cold Maybe) that bridges the reactive world with the callback-style world.
|
final
Maybe<T>
|
defaultIfEmpty(T defaultItem)
Returns a Maybe that emits the item emitted by the source Maybe or a specified default item
if the source Maybe is empty.
|
static
<T>
Maybe<T>
|
defer(Callable<? extends MaybeSource<? extends T>> maybeSupplier)
Calls a Callable for each individual MaybeObserver to return the actual MaybeSource source to
be subscribed to.
|
final
<U, V>
Maybe<T>
|
delay(Publisher<U> delayIndicator)
Delays the emission of this Maybe until the given Publisher signals an item or completes.
|
final
Maybe<T>
|
delay(long delay, TimeUnit unit)
Returns a Maybe that signals the events emitted by the source Maybe shifted forward in time by a
specified delay.
|
final
Maybe<T>
|
delay(long delay, TimeUnit unit, Scheduler scheduler)
Returns a Maybe that signals the events emitted by the source Maybe shifted forward in time by a
specified delay running on the specified Scheduler.
|
final
<U>
Maybe<T>
|
delaySubscription(Publisher<U> subscriptionIndicator)
Returns a Maybe that delays the subscription to this Maybe
until the other Publisher emits an element or completes normally.
|
final
Maybe<T>
|
delaySubscription(long delay, TimeUnit unit, Scheduler scheduler)
Returns a Maybe that delays the subscription to the source Maybe by a given amount of time,
both waiting and subscribing on a given Scheduler.
|
final
Maybe<T>
|
delaySubscription(long delay, TimeUnit unit)
Returns a Maybe that delays the subscription to the source Maybe by a given amount of time.
|
final
Maybe<T>
|
doAfterSuccess(Consumer<? super T> onAfterSuccess)
Calls the specified consumer with the success item after this item has been emitted to the downstream.
|
final
Maybe<T>
|
doAfterTerminate(Action onAfterTerminate)
|
final
Maybe<T>
|
doFinally(Action onFinally)
Calls the specified action after this Maybe signals onSuccess, onError or onComplete or gets disposed by
the downstream.
|
final
Maybe<T>
|
doOnComplete(Action onComplete)
Modifies the source Maybe so that it invokes an action when it calls onComplete .
|
final
Maybe<T>
|
doOnDispose(Action onDispose)
Calls the shared Action if a MaybeObserver subscribed to the current Maybe
disposes the common Disposable it received via onSubscribe.
|
final
Maybe<T>
|
doOnError(Consumer<? super Throwable> onError)
Calls the shared consumer with the error sent via onError for each
MaybeObserver that subscribes to the current Maybe.
|
final
Maybe<T>
|
doOnEvent(BiConsumer<? super T, ? super 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.
|
final
Maybe<T>
|
doOnSubscribe(Consumer<? super Disposable> onSubscribe)
Calls the shared consumer with the Disposable sent through the onSubscribe for each
MaybeObserver that subscribes to the current Maybe.
|
final
Maybe<T>
|
doOnSuccess(Consumer<? super T> onSuccess)
Calls the shared consumer with the success value sent via onSuccess for each
MaybeObserver that subscribes to the current Maybe.
|
static
<T>
Maybe<T>
|
empty()
Returns a (singleton) Maybe instance that calls onComplete
immediately.
|
static
<T>
Maybe<T>
|
error(Throwable exception)
Returns a Maybe that invokes a subscriber's onError method when the
subscriber subscribes to it.
|
static
<T>
Maybe<T>
|
error(Callable<? extends Throwable> supplier)
Returns a Maybe that invokes a MaybeObserver 's onError method when the
MaybeObserver subscribes to it.
|
final
Maybe<T>
|
filter(Predicate<? super T> predicate)
Filters the success item of the Maybe via a predicate function and emitting it if the predicate
returns true, completing otherwise.
|
final
<U, R>
Maybe<R>
|
flatMap(Function<? super T, ? extends MaybeSource<? extends U>> mapper, BiFunction<? super T, ? super U, ? extends R> resultSelector)
Returns a Maybe that emits the results of a specified function to the pair of values emitted by the
source Maybe and a specified mapped MaybeSource.
|
final
<R>
Maybe<R>
|
flatMap(Function<? super T, ? extends MaybeSource<? extends R>> onSuccessMapper, Function<? super Throwable, ? extends MaybeSource<? extends R>> onErrorMapper, Callable<? extends MaybeSource<? extends R>> onCompleteSupplier)
Maps the onSuccess, onError or onComplete signals of this Maybe into MaybeSource and emits that
MaybeSource's signals
- Scheduler:
flatMap does not operate by default on a particular Scheduler .
|
final
<R>
Maybe<R>
|
flatMap(Function<? super T, ? extends MaybeSource<? extends R>> mapper)
Returns a Maybe that is based on applying a specified function to the item emitted by the source Maybe,
where that function returns a MaybeSource.
|
final
Completable
|
flatMapCompletable(Function<? super T, ? extends CompletableSource> mapper)
Returns a Completable that completes based on applying a specified function to the item emitted by the
source Maybe , where that function returns a Completable .
|
final
<R>
Observable<R>
|
flatMapObservable(Function<? super T, ? extends ObservableSource<? extends R>> mapper)
Returns an Observable that is based on applying a specified function to the item emitted by the source Maybe,
where that function returns an ObservableSource.
|
final
<R>
Flowable<R>
|
flatMapPublisher(Function<? super T, ? extends Publisher<? extends R>> mapper)
Returns a Flowable that emits items based on applying a specified function to the item emitted by the
source Maybe, where that function returns a Publisher.
|
final
<R>
Single<R>
|
flatMapSingle(Function<? super T, ? extends SingleSource<? extends R>> mapper)
Returns a Single based on applying a specified function to the item emitted by the
source Maybe , where that function returns a Single .
|
final
<R>
Maybe<R>
|
flatMapSingleElement(Function<? super T, ? extends SingleSource<? extends R>> mapper)
Returns a Maybe based on applying a specified function to the item emitted by the
source Maybe , where that function returns a Single .
|
final
<U>
Flowable<U>
|
flattenAsFlowable(Function<? super T, ? extends Iterable<? extends U>> mapper)
Returns a Flowable that merges each item emitted by the source Maybe with the values in an
Iterable corresponding to that item that is generated by a selector.
|
final
<U>
Observable<U>
|
flattenAsObservable(Function<? super T, ? extends Iterable<? extends U>> mapper)
Returns an Observable that maps a success value into an Iterable and emits its items.
|
static
<T>
Maybe<T>
|
fromAction(Action run)
Returns a Maybe instance that runs the given Action for each subscriber and
emits either its exception or simply completes.
|
static
<T>
Maybe<T>
|
fromCallable(Callable<? extends T> callable)
Returns a Maybe that invokes passed function and emits its result for each new MaybeObserver that subscribes
while considering null value from the callable as indication for valueless completion.
|
static
<T>
Maybe<T>
|
fromCompletable(CompletableSource completableSource)
Wraps a CompletableSource into a Maybe.
|
static
<T>
Maybe<T>
|
fromFuture(Future<? extends T> future)
Converts a Future into a Maybe, treating a null result as an indication of emptiness.
|
static
<T>
Maybe<T>
|
fromFuture(Future<? extends T> future, long timeout, TimeUnit unit)
Converts a Future into a Maybe, with a timeout on the Future.
|
static
<T>
Maybe<T>
|
fromRunnable(Runnable run)
Returns a Maybe instance that runs the given Action for each subscriber and
emits either its exception or simply completes.
|
static
<T>
Maybe<T>
|
fromSingle(SingleSource<T> singleSource)
Wraps a SingleSource into a Maybe.
|
final
Maybe<T>
|
hide()
Hides the identity of this Maybe and its Disposable.
|
final
Completable
|
ignoreElement()
Ignores the item emitted by the source Maybe and only calls onComplete or onError .
|
final
Single<Boolean>
|
isEmpty()
Returns a Single that emits true if the source Maybe is empty, otherwise false .
|
static
<T>
Maybe<T>
|
just(T item)
Returns a Maybe that emits a specified item.
|
final
<R>
Maybe<R>
|
lift(MaybeOperator<? extends R, ? super T> lift)
Lifts a function to the current Maybe and returns a new Maybe that when subscribed to will pass the
values of the current Maybe through the MaybeOperator function.
|
final
<R>
Maybe<R>
|
map(Function<? super T, ? extends R> mapper)
Returns a Maybe that applies a specified function to the item emitted by the source Maybe and
emits the result of this function application.
|
static
<T>
Maybe<T>
|
merge(MaybeSource<? extends MaybeSource<? extends 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
<T>
Flowable<T>
|
merge(Publisher<? extends MaybeSource<? extends T>> sources, int maxConcurrency)
Merges a Flowable sequence of MaybeSource instances into a single Flowable sequence,
running at most maxConcurrency MaybeSources at once.
|
static
<T>
Flowable<T>
|
merge(Publisher<? extends MaybeSource<? extends T>> sources)
Merges a Flowable sequence of MaybeSource instances into a single Flowable sequence,
running all MaybeSources at once.
|
static
<T>
Flowable<T>
|
merge(Iterable<? extends MaybeSource<? extends T>> sources)
Merges an Iterable sequence of MaybeSource instances into a single Flowable sequence,
running all MaybeSources at once.
|
static
<T>
Flowable<T>
|
merge(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2)
Flattens two MaybeSources into a single Flowable, without any transformation.
|
static
<T>
Flowable<T>
|
merge(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2, MaybeSource<? extends T> source3, MaybeSource<? extends T> source4)
Flattens four MaybeSources into a single Flowable, without any transformation.
|
static
<T>
Flowable<T>
|
merge(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2, MaybeSource<? extends T> source3)
Flattens three MaybeSources into a single Flowable, without any transformation.
|
static
<T>
Flowable<T>
|
mergeArray(MaybeSource...<? extends T> sources)
Merges an array sequence of MaybeSource instances into a single Flowable sequence,
running all MaybeSources at once.
|
static
<T>
Flowable<T>
|
mergeArrayDelayError(MaybeSource...<? extends T> sources)
Flattens an array of MaybeSources into one Flowable, in a way that allows a Subscriber to receive all
successfully emitted items from each of the source MaybeSources without being interrupted by an error
notification from one of them.
|
static
<T>
Flowable<T>
|
mergeDelayError(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2, MaybeSource<? extends T> source3)
Flattens three MaybeSource into one Flowable, in a way that allows a Subscriber to receive all
successfully emitted items from all of the source MaybeSources without being interrupted by an error
notification from one of them.
|
static
<T>
Flowable<T>
|
mergeDelayError(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2, MaybeSource<? extends T> source3, MaybeSource<? extends T> source4)
Flattens four MaybeSources into one Flowable, in a way that allows a Subscriber to receive all
successfully emitted items from all of the source MaybeSources without being interrupted by an error
notification from one of them.
|
static
<T>
Flowable<T>
|
mergeDelayError(Iterable<? extends MaybeSource<? extends T>> sources)
Flattens an Iterable of MaybeSources into one Flowable, in a way that allows a Subscriber to receive all
successfully emitted items from each of the source MaybeSources without being interrupted by an error
notification from one of them.
|
static
<T>
Flowable<T>
|
mergeDelayError(Publisher<? extends MaybeSource<? extends T>> sources)
Flattens a Publisher that emits MaybeSources into one Publisher, in a way that allows a Subscriber to
receive all successfully emitted items from all of the source Publishers without being interrupted by
an error notification from one of them.
|
static
<T>
Flowable<T>
|
mergeDelayError(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2)
Flattens two MaybeSources into one Flowable, in a way that allows a Subscriber to receive all
successfully emitted items from each of the source MaybeSources without being interrupted by an error
notification from one of them.
|
final
Flowable<T>
|
mergeWith(MaybeSource<? extends T> other)
Flattens this and another Maybe into a single Flowable, without any transformation.
|
static
<T>
Maybe<T>
|
never()
Returns a Maybe that never sends any items or notifications to a MaybeObserver .
|
final
Maybe<T>
|
observeOn(Scheduler scheduler)
Wraps a Maybe to emit its item (or notify of its error) on a specified Scheduler ,
asynchronously.
|
final
<U>
Maybe<U>
|
ofType(Class<U> clazz)
Filters the items emitted by a Maybe, only emitting its success value if that
is an instance of the supplied Class.
|
final
Maybe<T>
|
onErrorComplete(Predicate<? super 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.
|
final
Maybe<T>
|
onErrorComplete()
Returns a Maybe instance that if this Maybe emits an error, it will emit an onComplete
and swallow the throwable.
|
final
Maybe<T>
|
onErrorResumeNext(Function<? super Throwable, ? extends MaybeSource<? extends T>> resumeFunction)
Instructs a Maybe to pass control to another Maybe rather than invoking
onError if it encounters an error.
|
final
Maybe<T>
|
onErrorResumeNext(MaybeSource<? extends T> next)
Instructs a Maybe to pass control to another MaybeSource rather than invoking
onError if it encounters an error.
|
final
Maybe<T>
|
onErrorReturn(Function<? super Throwable, ? extends T> valueSupplier)
Instructs a Maybe to emit an item (returned by a specified function) rather than invoking
onError if it encounters an error.
|
final
Maybe<T>
|
onErrorReturnItem(T item)
Instructs a Maybe to emit an item (returned by a specified function) rather than invoking
onError if it encounters an error.
|
final
Maybe<T>
|
onExceptionResumeNext(MaybeSource<? extends T> next)
Instructs a Maybe to pass control to another MaybeSource rather than invoking
onError if it encounters an Exception .
|
final
Maybe<T>
|
onTerminateDetach()
Nulls out references to the upstream producer and downstream MaybeObserver if
the sequence is terminated or downstream calls dispose().
|
final
Flowable<T>
|
repeat()
Returns a Flowable that repeats the sequence of items emitted by the source Maybe indefinitely.
|
final
Flowable<T>
|
repeat(long times)
Returns a Flowable that repeats the sequence of items emitted by the source Maybe at most
count times.
|
final
Flowable<T>
|
repeatUntil(BooleanSupplier stop)
Returns a Flowable that repeats the sequence of items emitted by the source Maybe until
the provided stop function returns true.
|
final
Flowable<T>
|
repeatWhen(Function<? super Flowable<Object>, ? extends Publisher<?>> handler)
Returns a Flowable that emits the same values as the source Publisher with the exception of an
onComplete .
|
final
Maybe<T>
|
retry(long times, Predicate<? super Throwable> predicate)
Retries at most times or until the predicate returns false, whichever happens first.
|
final
Maybe<T>
|
retry(BiPredicate<? super Integer, ? super Throwable> predicate)
Returns a Maybe that mirrors the source Maybe, resubscribing to it if it calls onError
and the predicate returns true for that specific exception and retry count.
|
final
Maybe<T>
|
retry(Predicate<? super Throwable> predicate)
Retries the current Maybe if it fails and the predicate returns true.
|
final
Maybe<T>
|
retry()
Returns a Maybe that mirrors the source Maybe, resubscribing to it if it calls onError
(infinite retry count).
|
final
Maybe<T>
|
retry(long count)
Returns a Maybe that mirrors the source Maybe, resubscribing to it if it calls onError
up to a specified number of retries.
|
final
Maybe<T>
|
retryUntil(BooleanSupplier stop)
Retries until the given stop function returns true.
|
final
Maybe<T>
|
retryWhen(Function<? super Flowable<Throwable>, ? extends Publisher<?>> handler)
Returns a Maybe that emits the same values as the source Maybe with the exception of an
onError .
|
static
<T>
Single<Boolean>
|
sequenceEqual(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2)
Returns a Single that emits a Boolean value that indicates whether two MaybeSource sequences are the
same by comparing the items emitted by each MaybeSource pairwise.
|
static
<T>
Single<Boolean>
|
sequenceEqual(MaybeSource<? extends T> source1, MaybeSource<? extends T> source2, BiPredicate<? super T, ? super T> isEqual)
Returns a Single that emits a Boolean value that indicates whether two MaybeSources are the
same by comparing the items emitted by each MaybeSource pairwise based on the results of a specified
equality function.
|
final
void
|
subscribe(MaybeObserver<? super T> observer)
Subscribes the given MaybeObserver to this MaybeSource instance.
|
final
Disposable
|
subscribe(Consumer<? super T> onSuccess)
Subscribes to a Maybe and provides a callback to handle the items it emits.
|
final
Disposable
|
subscribe(Consumer<? super T> onSuccess, Consumer<? super Throwable> onError, Action onComplete)
Subscribes to a Maybe and provides callbacks to handle the items it emits and any error or
completion notification it issues.
|
final
Disposable
|
subscribe(Consumer<? super T> onSuccess, Consumer<? super Throwable> onError)
Subscribes to a Maybe and provides callbacks to handle the items it emits and any error
notification it issues.
|
final
Disposable
|
subscribe()
Subscribes to a Maybe and ignores onSuccess and onComplete emissions.
|
abstract
void
|
subscribeActual(MaybeObserver<? super T> observer)
Override this method in subclasses to handle the incoming MaybeObservers.
|
final
Maybe<T>
|
subscribeOn(Scheduler scheduler)
Asynchronously subscribes subscribers to this Maybe on the specified Scheduler .
|
final
<E extends MaybeObserver<? super T>>
E
|
subscribeWith(E observer)
Subscribes a given MaybeObserver (subclass) to this Maybe and returns the given
MaybeObserver as is.
|
final
Maybe<T>
|
switchIfEmpty(MaybeSource<? extends T> other)
Returns a Maybe that emits the items emitted by the source Maybe or the items of an alternate
MaybeSource if the current Maybe is empty.
|
final
<U>
Maybe<T>
|
takeUntil(Publisher<U> other)
Returns a Maybe that emits the item emitted by the source Maybe until a second Publisher
emits an item.
|
final
<U>
Maybe<T>
|
takeUntil(MaybeSource<U> other)
Returns a Maybe that emits the items emitted by the source Maybe until a second MaybeSource
emits an item.
|
final
TestObserver<T>
|
test(boolean cancelled)
Creates a TestObserver optionally in cancelled state, then subscribes it to this Maybe.
|
final
TestObserver<T>
|
test()
Creates a TestObserver and subscribes
it to this Maybe.
|
final
Maybe<T>
|
timeout(long timeout, TimeUnit timeUnit)
Returns a Maybe that mirrors the source Maybe but applies a timeout policy for each emitted
item.
|
final
<U>
Maybe<T>
|
timeout(Publisher<U> timeoutIndicator, MaybeSource<? extends T> fallback)
If the current Maybe source didn't signal an event before the timeoutIndicator Publisher signals,
the current Maybe is cancelled and the fallback MaybeSource subscribed to
as a continuation.
|
final
<U>
Maybe<T>
|
timeout(MaybeSource<U> timeoutIndicator, MaybeSource<? extends T> fallback)
If the current Maybe source didn't signal an event before the timeoutIndicator MaybeSource signals,
the current Maybe is cancelled and the fallback MaybeSource subscribed to
as a continuation.
|
final
Maybe<T>
|
timeout(long timeout, TimeUnit timeUnit, MaybeSource<? extends T> fallback)
Returns a Maybe that mirrors the source Maybe but applies a timeout policy for each emitted
item.
|
final
<U>
Maybe<T>
|
timeout(MaybeSource<U> timeoutIndicator)
If this Maybe source didn't signal an event before the timeoutIndicator MaybeSource signals, a
TimeoutException is signalled instead.
|
final
Maybe<T>
|
timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler, MaybeSource<? extends T> fallback)
Returns a Maybe that mirrors the source Maybe but applies a timeout policy for each emitted
item using a specified Scheduler.
|
final
<U>
Maybe<T>
|
timeout(Publisher<U> timeoutIndicator)
If this Maybe source didn't signal an event before the timeoutIndicator Publisher signals, a
TimeoutException is signalled instead.
|
final
Maybe<T>
|
timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler)
Returns a Maybe that mirrors the source Maybe but applies a timeout policy for each emitted
item, where this policy is governed on a specified Scheduler.
|
static
Maybe<Long>
|
timer(long delay, TimeUnit unit, Scheduler scheduler)
Returns a Maybe that emits 0L after a specified delay on a specified Scheduler.
|
static
Maybe<Long>
|
timer(long delay, TimeUnit unit)
Returns a Maybe that emits 0L after a specified delay.
|
final
<R>
R
|
to(Function<? super Maybe<T>, R> convert)
Calls the specified converter function with the current Maybe instance
during assembly time and returns its result.
|
final
Flowable<T>
|
toFlowable()
Converts this Maybe into a backpressure-aware Flowable instance composing cancellation
through.
|
final
Observable<T>
|
toObservable()
Converts this Maybe into an Observable instance composing cancellation
through.
|
final
Single<T>
|
toSingle()
Converts this Maybe into a Single instance composing cancellation
through and turning an empty Maybe into a signal of NoSuchElementException.
|
final
Single<T>
|
toSingle(T defaultValue)
Converts this Maybe into a Single instance composing cancellation
through and turning an empty Maybe into a Single that emits the given
value through onSuccess.
|
static
<T>
Maybe<T>
|
unsafeCreate(MaybeSource<T> onSubscribe)
Advanced use only: creates a Maybe instance without
any safeguards by using a callback that is called with a MaybeObserver.
|
final
Maybe<T>
|
unsubscribeOn(Scheduler scheduler)
Returns a Maybe which makes sure when a MaybeObserver disposes the Disposable,
that call is propagated up on the specified scheduler
- Scheduler:
unsubscribeOn calls dispose() of the upstream on the Scheduler you specify.
|
static
<T, D>
Maybe<T>
|
using(Callable<? extends D> resourceSupplier, Function<? super D, ? extends MaybeSource<? extends T>> sourceSupplier, Consumer<? super D> resourceDisposer)
Constructs a Maybe that creates a dependent resource object which is disposed of when the
upstream terminates or the downstream calls dispose().
|
static
<T, D>
Maybe<T>
|
using(Callable<? extends D> resourceSupplier, Function<? super D, ? extends MaybeSource<? extends T>> sourceSupplier, Consumer<? super D> resourceDisposer, boolean eager)
Constructs a Maybe that creates a dependent resource object which is disposed of just before
termination if you have set disposeEagerly to true and a downstream dispose() does not occur
before termination.
|
static
<T>
Maybe<T>
|
wrap(MaybeSource<T> source)
Wraps a MaybeSource instance into a new Maybe instance if not already a Maybe
instance.
|
static
<T1, T2, T3, R>
Maybe<R>
|
zip(MaybeSource<? extends T1> source1, MaybeSource<? extends T2> source2, MaybeSource<? extends T3> source3, Function3<? super T1, ? super T2, ? super T3, ? extends 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 MaybeSources.
|
static
<T, R>
Maybe<R>
|
zip(Iterable<? extends MaybeSource<? extends T>> sources, Function<? super Object[], ? extends 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 MaybeSources.
|
static
<T1, T2, T3, T4, T5, T6, T7, R>
Maybe<R>
|
zip(MaybeSource<? extends T1> source1, MaybeSource<? extends T2> source2, MaybeSource<? extends T3> source3, MaybeSource<? extends T4> source4, MaybeSource<? extends T5> source5, MaybeSource<? extends T6> source6, MaybeSource<? extends T7> source7, Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends 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 MaybeSources.
|
static
<T1, T2, R>
Maybe<R>
|
zip(MaybeSource<? extends T1> source1, MaybeSource<? extends T2> source2, BiFunction<? super T1, ? super T2, ? extends 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 MaybeSources.
|
static
<T1, T2, T3, T4, T5, R>
Maybe<R>
|
zip(MaybeSource<? extends T1> source1, MaybeSource<? extends T2> source2, MaybeSource<? extends T3> source3, MaybeSource<? extends T4> source4, MaybeSource<? extends T5> source5, Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends 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 MaybeSources.
|
static
<T1, T2, T3, T4, T5, T6, T7, T8, R>
Maybe<R>
|
zip(MaybeSource<? extends T1> source1, MaybeSource<? extends T2> source2, MaybeSource<? extends T3> source3, MaybeSource<? extends T4> source4, MaybeSource<? extends T5> source5, MaybeSource<? extends T6> source6, MaybeSource<? extends T7> source7, MaybeSource<? extends T8> source8, Function8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends 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 MaybeSources.
|
static
<T1, T2, T3, T4, T5, T6, R>
Maybe<R>
|
zip(MaybeSource<? extends T1> source1, MaybeSource<? extends T2> source2, MaybeSource<? extends T3> source3, MaybeSource<? extends T4> source4, MaybeSource<? extends T5> source5, MaybeSource<? extends T6> source6, Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends 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 MaybeSources.
|
static
<T1, T2, T3, T4, T5, T6, T7, T8, T9, R>
Maybe<R>
|
zip(MaybeSource<? extends T1> source1, MaybeSource<? extends T2> source2, MaybeSource<? extends T3> source3, MaybeSource<? extends T4> source4, MaybeSource<? extends T5> source5, MaybeSource<? extends T6> source6, MaybeSource<? extends T7> source7, MaybeSource<? extends T8> source8, MaybeSource<? extends T9> source9, Function9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends 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 MaybeSources.
|
static
<T1, T2, T3, T4, R>
Maybe<R>
|
zip(MaybeSource<? extends T1> source1, MaybeSource<? extends T2> source2, MaybeSource<? extends T3> source3, MaybeSource<? extends T4> source4, Function4<? super T1, ? super T2, ? super T3, ? super T4, ? extends 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 MaybeSources.
|
static
<T, R>
Maybe<R>
|
zipArray(Function<? super Object[], ? extends R> zipper, MaybeSource...<? extends 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 MaybeSources.
|
final
<U, R>
Maybe<R>
|
zipWith(MaybeSource<? extends U> other, BiFunction<? super T, ? super U, ? extends 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.
|