Package | Description |
---|---|
io.reactivex |
Base reactive classes:
Flowable , Observable ,
Single , Maybe and
Completable ; base reactive consumers;
other common base interfaces. |
io.reactivex.internal.fuseable |
Base interfaces and types for supporting operator-fusion.
|
io.reactivex.internal.operators.flowable | |
io.reactivex.internal.operators.maybe | |
io.reactivex.internal.operators.observable | |
io.reactivex.internal.operators.single | |
io.reactivex.plugins |
Contains the central plugin handler
RxJavaPlugins
class to hook into the lifecycle of the base reactive types and schedulers. |
io.reactivex.subjects |
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.
|
Modifier and Type | Method and Description |
---|---|
static <T> Maybe<T> |
Maybe.amb(Iterable<? extends MaybeSource<? extends T>> sources)
Runs multiple MaybeSources and signals the events of the first one that signals (cancelling
the rest).
|
static <T> Maybe<T> |
Maybe.ambArray(MaybeSource<? extends T>... sources)
Runs multiple MaybeSources and signals the events of the first one that signals (cancelling
the rest).
|
Maybe<T> |
Maybe.ambWith(MaybeSource<? extends T> other)
Mirrors the MaybeSource (current or provided) that first signals an event.
|
<T> Maybe<T> |
Completable.andThen(MaybeSource<T> next)
Returns a
Maybe which will subscribe to this Completable and once that is completed then
will subscribe to the next MaybeSource. |
Maybe<T> |
Maybe.cache()
Returns a Maybe that subscribes to this Maybe lazily, caches its event
and replays it, to all the downstream subscribers.
|
<U> Maybe<U> |
Maybe.cast(Class<? extends U> clazz)
Casts the success value of the current Maybe into the target type or signals a
ClassCastException if not compatible.
|
<R> Maybe<R> |
Maybe.compose(MaybeTransformer<? super T,? extends R> transformer)
Transform a Maybe by applying a particular Transformer function to it.
|
<R> Maybe<R> |
Maybe.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.
|
static <T> Maybe<T> |
Maybe.create(MaybeOnSubscribe<T> onSubscribe)
Provides an API (via a cold Maybe) that bridges the reactive world with the callback-style world.
|
Maybe<T> |
Maybe.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> |
Maybe.defer(Callable<? extends MaybeSource<? extends T>> maybeSupplier)
Calls a Callable for each individual MaybeObserver to return the actual MaybeSource source to
be subscribed to.
|
Maybe<T> |
Maybe.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.
|
Maybe<T> |
Maybe.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.
|
<U,V> Maybe<T> |
Maybe.delay(org.reactivestreams.Publisher<U> delayIndicator)
Delays the emission of this Maybe until the given Publisher signals an item or completes.
|
Maybe<T> |
Maybe.delaySubscription(long delay,
TimeUnit unit)
Returns a Maybe that delays the subscription to the source Maybe by a given amount of time.
|
Maybe<T> |
Maybe.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.
|
<U> Maybe<T> |
Maybe.delaySubscription(org.reactivestreams.Publisher<U> subscriptionIndicator)
Returns a Maybe that delays the subscription to this Maybe
until the other Publisher emits an element or completes normally.
|
Maybe<T> |
Maybe.doAfterSuccess(Consumer<? super T> onAfterSuccess)
Calls the specified consumer with the success item after this item has been emitted to the downstream.
|
Maybe<T> |
Maybe.doAfterTerminate(Action onAfterTerminate)
|
Maybe<T> |
Maybe.doFinally(Action onFinally)
Calls the specified action after this Maybe signals onSuccess, onError or onComplete or gets disposed by
the downstream.
|
Maybe<T> |
Maybe.doOnComplete(Action onComplete)
Modifies the source Maybe so that it invokes an action when it calls
onComplete . |
Maybe<T> |
Maybe.doOnDispose(Action onDispose)
Calls the shared
Action if a MaybeObserver subscribed to the current Maybe
disposes the common Disposable it received via onSubscribe. |
Maybe<T> |
Maybe.doOnError(Consumer<? super Throwable> onError)
Calls the shared consumer with the error sent via onError for each
MaybeObserver that subscribes to the current Maybe.
|
Maybe<T> |
Maybe.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.
|
Maybe<T> |
Maybe.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.
|
Maybe<T> |
Maybe.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.
|
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.
|
Maybe<T> |
Observable.elementAt(long index)
Returns a Maybe that emits the single item at a specified index in a sequence of emissions from
this Observable or completes if this Observable signals fewer elements than index.
|
static <T> Maybe<T> |
Maybe.empty()
Returns a (singleton) Maybe instance that calls
onComplete
immediately. |
static <T> Maybe<T> |
Maybe.error(Callable<? extends Throwable> supplier)
Returns a Maybe that invokes a
MaybeObserver 's onError method when the
MaybeObserver subscribes to it. |
static <T> Maybe<T> |
Maybe.error(Throwable exception)
Returns a Maybe that invokes a subscriber's
onError method when the
subscriber subscribes to it. |
Maybe<T> |
Maybe.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.
|
Maybe<T> |
Single.filter(Predicate<? super T> predicate)
Filters the success item of the Single via a predicate function and emitting it if the predicate
returns true, completing otherwise.
|
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.
|
Maybe<T> |
Observable.firstElement()
Returns a Maybe that emits only the very first item emitted by the source ObservableSource, or
completes if the source ObservableSource is empty.
|
<R> Maybe<R> |
Maybe.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.
|
<R> Maybe<R> |
Maybe.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.
|
<U,R> Maybe<R> |
Maybe.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.
|
<R> Maybe<R> |
Single.flatMapMaybe(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 Single,
where that function returns a MaybeSource.
|
<R> Maybe<R> |
Maybe.flatMapSingleElement(Function<? super T,? extends SingleSource<? extends R>> mapper)
|
static <T> Maybe<T> |
Maybe.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> |
Maybe.fromCallable(Callable<? extends 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 <T> Maybe<T> |
Maybe.fromCompletable(CompletableSource completableSource)
Wraps a CompletableSource into a Maybe.
|
static <T> Maybe<T> |
Maybe.fromFuture(Future<? extends T> future)
Converts a
Future into a Maybe, treating a null result as an indication of emptiness. |
static <T> Maybe<T> |
Maybe.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> |
Maybe.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> |
Maybe.fromSingle(SingleSource<T> singleSource)
Wraps a SingleSource into a Maybe.
|
Maybe<T> |
Maybe.hide()
Hides the identity of this Maybe and its Disposable.
|
static <T> Maybe<T> |
Maybe.just(T item)
Returns a
Maybe that emits a specified item. |
Maybe<T> |
Flowable.lastElement()
Returns a Maybe that emits the last item emitted by this Flowable or completes if
this Flowable is empty.
|
Maybe<T> |
Observable.lastElement()
Returns a Maybe that emits the last item emitted by this Observable or
completes if this Observable is empty.
|
<R> Maybe<R> |
Maybe.lift(MaybeOperator<? extends R,? super 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. |
<R> Maybe<R> |
Maybe.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> |
Maybe.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> Maybe<T> |
Maybe.never()
Returns a Maybe that never sends any items or notifications to a
MaybeObserver . |
Maybe<T> |
Maybe.observeOn(Scheduler scheduler)
Wraps a Maybe to emit its item (or notify of its error) on a specified
Scheduler ,
asynchronously. |
<U> Maybe<U> |
Maybe.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.
|
Maybe<T> |
Maybe.onErrorComplete()
Returns a Maybe instance that if this Maybe emits an error, it will emit an onComplete
and swallow the throwable.
|
Maybe<T> |
Maybe.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.
|
Maybe<T> |
Maybe.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. |
Maybe<T> |
Maybe.onErrorResumeNext(MaybeSource<? extends T> next)
Instructs a Maybe to pass control to another
MaybeSource rather than invoking
onError if it encounters an error. |
Maybe<T> |
Maybe.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. |
Maybe<T> |
Maybe.onErrorReturnItem(T item)
Instructs a Maybe to emit an item (returned by a specified function) rather than invoking
onError if it encounters an error. |
Maybe<T> |
Maybe.onExceptionResumeNext(MaybeSource<? extends T> next)
|
Maybe<T> |
Maybe.onTerminateDetach()
Nulls out references to the upstream producer and downstream MaybeObserver if
the sequence is terminated or downstream calls dispose().
|
Maybe<T> |
Flowable.reduce(BiFunction<T,T,T> reducer)
Returns a Maybe that applies a specified accumulator function to the first item emitted by a source
Publisher, then feeds the result of that function along with the second item emitted by the source
Publisher into the same function, and so on until all items have been emitted by the finite source Publisher,
and emits the final result from the final call to your function as its sole item.
|
Maybe<T> |
Observable.reduce(BiFunction<T,T,T> reducer)
Returns a Maybe that applies a specified accumulator function to the first item emitted by a source
ObservableSource, then feeds the result of that function along with the second item emitted by the source
ObservableSource into the same function, and so on until all items have been emitted by the finite source ObservableSource,
and emits the final result from the final call to your function as its sole item.
|
Maybe<T> |
Maybe.retry()
Returns a Maybe that mirrors the source Maybe, resubscribing to it if it calls
onError
(infinite retry count). |
Maybe<T> |
Maybe.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. |
Maybe<T> |
Maybe.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. |
Maybe<T> |
Maybe.retry(long times,
Predicate<? super Throwable> predicate)
Retries at most times or until the predicate returns false, whichever happens first.
|
Maybe<T> |
Maybe.retry(Predicate<? super Throwable> predicate)
Retries the current Maybe if it fails and the predicate returns true.
|
Maybe<T> |
Maybe.retryUntil(BooleanSupplier stop)
Retries until the given stop function returns true.
|
Maybe<T> |
Maybe.retryWhen(Function<? super Flowable<Throwable>,? extends org.reactivestreams.Publisher<?>> handler)
Returns a Maybe that emits the same values as the source Maybe with the exception of an
onError . |
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. |
Maybe<T> |
Observable.singleElement()
Returns a Maybe that completes if this Observable is empty or emits the single item emitted by this Observable,
or signals an
IllegalArgumentException if this Observable emits more than one item. |
Maybe<T> |
Maybe.subscribeOn(Scheduler scheduler)
Asynchronously subscribes subscribers to this Maybe on the specified
Scheduler . |
Maybe<T> |
Maybe.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.
|
<U> Maybe<T> |
Maybe.takeUntil(MaybeSource<U> other)
Returns a Maybe that emits the items emitted by the source Maybe until a second MaybeSource
emits an item.
|
<U> Maybe<T> |
Maybe.takeUntil(org.reactivestreams.Publisher<U> other)
Returns a Maybe that emits the item emitted by the source Maybe until a second Publisher
emits an item.
|
Maybe<T> |
Maybe.timeout(long timeout,
TimeUnit timeUnit)
Returns a Maybe that mirrors the source Maybe but applies a timeout policy for each emitted
item.
|
Maybe<T> |
Maybe.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.
|
Maybe<T> |
Maybe.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.
|
Maybe<T> |
Maybe.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.
|
<U> Maybe<T> |
Maybe.timeout(MaybeSource<U> timeoutIndicator)
If the current
Maybe didn't signal an event before the timeoutIndicator MaybeSource signals, a
TimeoutException is signaled instead. |
<U> Maybe<T> |
Maybe.timeout(MaybeSource<U> timeoutIndicator,
MaybeSource<? extends T> fallback)
If the current
Maybe didn't signal an event before the timeoutIndicator MaybeSource signals,
the current Maybe is cancelled and the fallback MaybeSource subscribed to
as a continuation. |
<U> Maybe<T> |
Maybe.timeout(org.reactivestreams.Publisher<U> timeoutIndicator)
If the current
Maybe source didn't signal an event before the timeoutIndicator Publisher signals, a
TimeoutException is signaled instead. |
<U> Maybe<T> |
Maybe.timeout(org.reactivestreams.Publisher<U> timeoutIndicator,
MaybeSource<? extends T> fallback)
If the current
Maybe didn't signal an event before the timeoutIndicator Publisher signals,
the current Maybe is cancelled and the fallback MaybeSource subscribed to
as a continuation. |
static Maybe<Long> |
Maybe.timer(long delay,
TimeUnit unit)
Returns a Maybe that emits
0L after a specified delay. |
static Maybe<Long> |
Maybe.timer(long delay,
TimeUnit unit,
Scheduler scheduler)
Returns a Maybe that emits
0L after a specified delay on a specified Scheduler. |
Maybe<T> |
Single.toMaybe()
Converts this Single into a
Maybe . |
<T> Maybe<T> |
Completable.toMaybe()
Converts this Completable into a
Maybe . |
static <T> Maybe<T> |
Maybe.unsafeCreate(MaybeSource<T> onSubscribe)
Advanced use only: creates a Maybe instance without
any safeguards by using a callback that is called with a MaybeObserver.
|
Maybe<T> |
Maybe.unsubscribeOn(Scheduler scheduler)
Returns a Maybe which makes sure when a MaybeObserver disposes the Disposable,
that call is propagated up on the specified scheduler.
|
static <T,D> Maybe<T> |
Maybe.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> |
Maybe.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> |
Maybe.wrap(MaybeSource<T> source)
Wraps a MaybeSource instance into a new Maybe instance if not already a Maybe
instance.
|
static <T,R> Maybe<R> |
Maybe.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,R> Maybe<R> |
Maybe.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,R> |
Maybe.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 <T1,T2,T3,T4,R> |
Maybe.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 <T1,T2,T3,T4,T5,R> |
Maybe.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,R> |
Maybe.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,R> |
Maybe.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,T3,T4,T5,T6,T7,T8,R> |
Maybe.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,T7,T8,T9,R> |
Maybe.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 <T,R> Maybe<R> |
Maybe.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.
|
<U,R> Maybe<R> |
Maybe.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.
|
Modifier and Type | Method and Description |
---|---|
R |
MaybeConverter.apply(Maybe<T> upstream)
Applies a function to the upstream Maybe and returns a converted value of type
R . |
MaybeSource<Downstream> |
MaybeTransformer.apply(Maybe<Upstream> upstream)
Applies a function to the upstream Maybe and returns a MaybeSource with
optionally different element type.
|
Modifier and Type | Method and Description |
---|---|
<R> R |
Maybe.to(Function<? super Maybe<T>,R> convert)
Calls the specified converter function with the current Maybe instance
during assembly time and returns its result.
|
Modifier and Type | Method and Description |
---|---|
Maybe<T> |
FuseToMaybe.fuseToMaybe()
Returns a (direct) Maybe for the operator.
|
Modifier and Type | Class and Description |
---|---|
class |
FlowableElementAtMaybe<T> |
class |
FlowableLastMaybe<T>
Consumes the source Publisher and emits its last item or completes.
|
class |
FlowableReduceMaybe<T>
Reduce a Flowable into a single value exposed as Single or signal NoSuchElementException.
|
class |
FlowableSingleMaybe<T> |
Modifier and Type | Class and Description |
---|---|
class |
MaybeAmb<T>
Signals the event of the first MaybeSource that signals.
|
class |
MaybeCache<T>
Consumes the source once and replays its signal to any current or future MaybeObservers.
|
class |
MaybeCreate<T>
Provides an API over MaybeObserver that serializes calls to onXXX and manages cancellation
in a safe manner.
|
class |
MaybeDefer<T>
Defers the creation of the actual Maybe the incoming MaybeObserver is subscribed to.
|
class |
MaybeDelay<T>
Delays all signal types by the given amount and re-emits them on the given scheduler.
|
class |
MaybeDelayOtherPublisher<T,U>
Delay the emission of the main signal until the other signals an item or completes.
|
class |
MaybeDelaySubscriptionOtherPublisher<T,U>
Delay the subscription to the main Maybe until the other signals an item or completes.
|
class |
MaybeDelayWithCompletable<T> |
class |
MaybeDetach<T>
Breaks the references between the upstream and downstream when the Maybe terminates.
|
class |
MaybeDoAfterSuccess<T>
Calls a consumer after pushing the current item to the downstream.
|
class |
MaybeDoFinally<T>
Execute an action after an onSuccess, onError, onComplete or a dispose event.
|
class |
MaybeDoOnEvent<T>
Calls a BiConsumer with the success, error values of the upstream Maybe or with two nulls if
the Maybe completed.
|
class |
MaybeEmpty
Signals an onComplete.
|
class |
MaybeError<T>
Signals a constant Throwable.
|
class |
MaybeErrorCallable<T>
Signals a Throwable returned by a Callable.
|
class |
MaybeFilter<T>
Filters the upstream via a predicate, returning the success item or completing if
the predicate returns false.
|
class |
MaybeFilterSingle<T>
Filters the upstream SingleSource via a predicate, returning the success item or completing if
the predicate returns false.
|
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.
|
class |
MaybeFlatMapNotification<T,R>
Maps a value into a MaybeSource and relays its signal.
|
class |
MaybeFlatMapSingleElement<T,R>
Maps the success value of the source MaybeSource into a Single.
|
class |
MaybeFlatten<T,R>
Maps a value into a MaybeSource and relays its signal.
|
class |
MaybeFromAction<T>
Executes an Action and signals its exception or completes normally.
|
class |
MaybeFromCallable<T>
Executes a callable and signals its value as success or signals an exception.
|
class |
MaybeFromCompletable<T>
Wrap a Single into a Maybe.
|
class |
MaybeFromFuture<T>
Waits until the source Future completes or the wait times out; treats a
null
result as indication to signal onComplete instead of onSuccess . |
class |
MaybeFromRunnable<T>
Executes an Runnable and signals its exception or completes normally.
|
class |
MaybeFromSingle<T>
Wrap a Single into a Maybe.
|
class |
MaybeHide<T>
Hides the identity of the upstream Maybe and its Disposable sent through onSubscribe.
|
class |
MaybeIgnoreElement<T>
Turns an onSuccess into an onComplete, onError and onComplete is relayed as is.
|
class |
MaybeIsEmpty<T>
Signals true if the source Maybe signals onComplete, signals false if the source Maybe
signals onSuccess.
|
class |
MaybeJust<T>
Signals a constant value.
|
class |
MaybeLift<T,R>
Calls a MaybeOperator for the incoming MaybeObserver.
|
class |
MaybeMap<T,R>
Maps the upstream success value into some other value.
|
class |
MaybeNever
Doesn't signal any event other than onSubscribe.
|
class |
MaybeObserveOn<T>
Signals the onSuccess, onError or onComplete events on a the specific scheduler.
|
class |
MaybeOnErrorComplete<T>
Emits an onComplete if the source emits an onError and the predicate returns true for
that Throwable.
|
class |
MaybeOnErrorNext<T>
Subscribes to the MaybeSource returned by a function if the main source signals an onError.
|
class |
MaybeOnErrorReturn<T>
Returns a value generated via a function if the main source signals an onError.
|
class |
MaybePeek<T>
Peeks into the lifecycle of a Maybe and MaybeObserver.
|
class |
MaybeSubscribeOn<T>
Subscribes to the upstream MaybeSource on the specified scheduler.
|
class |
MaybeSwitchIfEmpty<T>
Subscribes to the other source if the main source is empty.
|
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.
|
class |
MaybeTakeUntilPublisher<T,U>
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.
|
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.
|
class |
MaybeTimeoutPublisher<T,U>
Switches to the fallback Maybe if the other Publisher signals a success or completes, or
signals TimeoutException if fallback is null.
|
class |
MaybeTimer
Signals a
0L after the specified delay. |
class |
MaybeUnsafeCreate<T>
Wraps a MaybeSource without safeguard and calls its subscribe() method for each MaybeObserver.
|
class |
MaybeUnsubscribeOn<T>
Makes sure a dispose() call from downstream happens on the specified scheduler.
|
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).
|
class |
MaybeZipArray<T,R> |
class |
MaybeZipIterable<T,R> |
Modifier and Type | Method and Description |
---|---|
Maybe<T> |
MaybeIgnoreElementCompletable.fuseToMaybe() |
Maybe<Boolean> |
MaybeIsEmptySingle.fuseToMaybe() |
Modifier and Type | Class and Description |
---|---|
class |
ObservableElementAtMaybe<T> |
class |
ObservableLastMaybe<T>
Consumes the source ObservableSource and emits its last item, the defaultItem
if empty or a NoSuchElementException if even the defaultItem is null.
|
class |
ObservableReduceMaybe<T>
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.
|
class |
ObservableSingleMaybe<T> |
Modifier and Type | Class and Description |
---|---|
class |
SingleFlatMapMaybe<T,R> |
Modifier and Type | Method and Description |
---|---|
static <T> Maybe<T> |
RxJavaPlugins.onAssembly(Maybe<T> source)
Calls the associated hook function.
|
Modifier and Type | Method and Description |
---|---|
static Function<? super Maybe,? extends Maybe> |
RxJavaPlugins.getOnMaybeAssembly()
Returns the current hook function.
|
static Function<? super Maybe,? extends Maybe> |
RxJavaPlugins.getOnMaybeAssembly()
Returns the current hook function.
|
static BiFunction<? super Maybe,? super MaybeObserver,? extends MaybeObserver> |
RxJavaPlugins.getOnMaybeSubscribe()
Returns the current hook function.
|
Modifier and Type | Method and Description |
---|---|
static <T> Maybe<T> |
RxJavaPlugins.onAssembly(Maybe<T> source)
Calls the associated hook function.
|
static <T> MaybeObserver<? super T> |
RxJavaPlugins.onSubscribe(Maybe<T> source,
MaybeObserver<? super T> subscriber)
Calls the associated hook function.
|
Modifier and Type | Method and Description |
---|---|
static void |
RxJavaPlugins.setOnMaybeAssembly(Function<? super Maybe,? extends Maybe> onMaybeAssembly)
Sets the specific hook function.
|
static void |
RxJavaPlugins.setOnMaybeAssembly(Function<? super Maybe,? extends Maybe> onMaybeAssembly)
Sets the specific hook function.
|
static void |
RxJavaPlugins.setOnMaybeSubscribe(BiFunction<? super Maybe,MaybeObserver,? extends MaybeObserver> onMaybeSubscribe)
Sets the specific hook function.
|
Modifier and Type | Class and Description |
---|---|
class |
MaybeSubject<T>
Represents a hot Maybe-like source and consumer of events similar to Subjects.
|
Copyright © 2018 JBoss by Red Hat. All rights reserved.