Package | Description |
---|---|
io.reactivex |
Base reactive classes:
Flowable , Observable ,
Single , Maybe and
Completable ; base reactive consumers;
other common base interfaces. |
io.reactivex.internal.functions | |
io.reactivex.internal.observers | |
io.reactivex.internal.operators.completable | |
io.reactivex.internal.operators.flowable | |
io.reactivex.internal.operators.maybe | |
io.reactivex.internal.operators.observable | |
io.reactivex.internal.operators.parallel | |
io.reactivex.internal.subscribers | |
io.reactivex.internal.util | |
io.reactivex.observers |
Default wrappers and implementations for Observer-based consumer classes and interfaces,
including disposable and resource-tracking variants and
the
TestObserver that allows unit testing
Observable -, Single -, Maybe -
and Completable -based flows. |
io.reactivex.parallel |
Contains the base type
ParallelFlowable ,
a sub-DSL for working with Flowable sequences in parallel. |
Modifier and Type | Method and Description |
---|---|
Single<Boolean> |
Observable.all(Predicate<? super T> predicate)
Returns a Single that emits a Boolean that indicates whether all of the items emitted by the source
ObservableSource satisfy a condition.
|
Single<Boolean> |
Flowable.all(Predicate<? super T> predicate)
Returns a Single that emits a Boolean that indicates whether all of the items emitted by the source
Publisher satisfy a condition.
|
Single<Boolean> |
Observable.any(Predicate<? super T> predicate)
Returns a Single that emits
true if any item emitted by the source ObservableSource satisfies a
specified condition, otherwise false . |
Single<Boolean> |
Flowable.any(Predicate<? super T> predicate)
Returns a Single that emits
true if any item emitted by the source Publisher satisfies a
specified condition, otherwise false . |
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.
|
Observable<T> |
Observable.filter(Predicate<? super T> predicate)
Filters items emitted by an ObservableSource by only emitting those that satisfy a specified predicate.
|
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.
|
Flowable<T> |
Flowable.filter(Predicate<? super T> predicate)
Filters items emitted by a Publisher by only emitting those that satisfy a specified predicate.
|
Disposable |
Observable.forEachWhile(Predicate<? super T> onNext)
Subscribes to the
ObservableSource and receives notifications for each element until the
onNext Predicate returns false. |
Disposable |
Flowable.forEachWhile(Predicate<? super T> onNext)
Subscribes to the
Publisher and receives notifications for each element until the
onNext Predicate returns false. |
Disposable |
Observable.forEachWhile(Predicate<? super T> onNext,
Consumer<? super Throwable> onError)
Subscribes to the
ObservableSource and receives notifications for each element and error events until the
onNext Predicate returns false. |
Disposable |
Flowable.forEachWhile(Predicate<? super T> onNext,
Consumer<? super Throwable> onError)
Subscribes to the
Publisher and receives notifications for each element and error events until the
onNext Predicate returns false. |
Disposable |
Observable.forEachWhile(Predicate<? super T> onNext,
Consumer<? super Throwable> onError,
Action onComplete)
Subscribes to the
ObservableSource and receives notifications for each element and the terminal events until the
onNext Predicate returns false. |
Disposable |
Flowable.forEachWhile(Predicate<? super T> onNext,
Consumer<? super Throwable> onError,
Action onComplete)
Subscribes to the
Publisher and receives notifications for each element and the terminal events until the
onNext Predicate returns false. |
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.
|
Completable |
Completable.onErrorComplete(Predicate<? super Throwable> predicate)
Returns a Completable instance that if this Completable emits an error and the predicate returns
true, it will emit an onComplete and swallow the throwable.
|
Single<T> |
Single.retry(long times,
Predicate<? super Throwable> predicate)
Repeatedly re-subscribe at most times or until the predicate returns false, whichever happens first
if it fails with an onError.
|
Observable<T> |
Observable.retry(long times,
Predicate<? super Throwable> predicate)
Retries at most times or until the predicate returns false, whichever happens first.
|
Maybe<T> |
Maybe.retry(long times,
Predicate<? super Throwable> predicate)
Retries at most times or until the predicate returns false, whichever happens first.
|
Flowable<T> |
Flowable.retry(long times,
Predicate<? super Throwable> predicate)
Retries at most times or until the predicate returns false, whichever happens first.
|
Completable |
Completable.retry(long times,
Predicate<? super Throwable> predicate)
Returns a Completable that when this Completable emits an error, retries at most times
or until the predicate returns false, whichever happens first and emitting the last error.
|
Single<T> |
Single.retry(Predicate<? super Throwable> predicate)
Re-subscribe to the current Single if the given predicate returns true when the Single fails
with an onError.
|
Observable<T> |
Observable.retry(Predicate<? super Throwable> predicate)
Retries the current Observable if the predicate returns true.
|
Maybe<T> |
Maybe.retry(Predicate<? super Throwable> predicate)
Retries the current Maybe if it fails and the predicate returns true.
|
Flowable<T> |
Flowable.retry(Predicate<? super Throwable> predicate)
Retries the current Flowable if the predicate returns true.
|
Completable |
Completable.retry(Predicate<? super Throwable> predicate)
Returns a Completable that when this Completable emits an error, calls the given predicate with
the latest exception to decide whether to resubscribe to this or not.
|
Observable<T> |
Observable.skipWhile(Predicate<? super T> predicate)
Returns an Observable that skips all items emitted by the source ObservableSource as long as a specified
condition holds true, but emits all further source items as soon as the condition becomes false.
|
Flowable<T> |
Flowable.skipWhile(Predicate<? super T> predicate)
Returns a Flowable that skips all items emitted by the source Publisher as long as a specified
condition holds true, but emits all further source items as soon as the condition becomes false.
|
Observable<T> |
Observable.takeUntil(Predicate<? super T> stopPredicate)
Returns an Observable that emits items emitted by the source Observable, checks the specified predicate
for each item, and then completes when the condition is satisfied.
|
Flowable<T> |
Flowable.takeUntil(Predicate<? super T> stopPredicate)
Returns a Flowable that emits items emitted by the source Publisher, checks the specified predicate
for each item, and then completes when the condition is satisfied.
|
Observable<T> |
Observable.takeWhile(Predicate<? super T> predicate)
Returns an Observable that emits items emitted by the source ObservableSource so long as each item satisfied a
specified condition, and then completes as soon as this condition is not satisfied.
|
Flowable<T> |
Flowable.takeWhile(Predicate<? super T> predicate)
Returns a Flowable that emits items emitted by the source Publisher so long as each item satisfied a
specified condition, and then completes as soon as this condition is not satisfied.
|
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
Functions.alwaysFalse() |
static <T> Predicate<T> |
Functions.alwaysTrue() |
static <T> Predicate<T> |
Functions.equalsWith(T value) |
static <T,U> Predicate<T> |
Functions.isInstanceOf(Class<U> clazz) |
static <T> Predicate<T> |
Functions.predicateReverseFor(BooleanSupplier supplier) |
Constructor and Description |
---|
ForEachWhileObserver(Predicate<? super T> onNext,
Consumer<? super Throwable> onError,
Action onComplete) |
Constructor and Description |
---|
CompletableOnErrorComplete(CompletableSource source,
Predicate<? super Throwable> predicate) |
Constructor and Description |
---|
FlowableAll(Flowable<T> source,
Predicate<? super T> predicate) |
FlowableAllSingle(Flowable<T> source,
Predicate<? super T> predicate) |
FlowableAny(Flowable<T> source,
Predicate<? super T> predicate) |
FlowableAnySingle(Flowable<T> source,
Predicate<? super T> predicate) |
FlowableFilter(Flowable<T> source,
Predicate<? super T> predicate) |
FlowableRetryPredicate(Flowable<T> source,
long count,
Predicate<? super Throwable> predicate) |
FlowableSkipWhile(Flowable<T> source,
Predicate<? super T> predicate) |
FlowableTakeUntilPredicate(Flowable<T> source,
Predicate<? super T> predicate) |
FlowableTakeWhile(Flowable<T> source,
Predicate<? super T> predicate) |
Constructor and Description |
---|
MaybeFilter(MaybeSource<T> source,
Predicate<? super T> predicate) |
MaybeFilterSingle(SingleSource<T> source,
Predicate<? super T> predicate) |
MaybeOnErrorComplete(MaybeSource<T> source,
Predicate<? super Throwable> predicate) |
Constructor and Description |
---|
ObservableAll(ObservableSource<T> source,
Predicate<? super T> predicate) |
ObservableAllSingle(ObservableSource<T> source,
Predicate<? super T> predicate) |
ObservableAny(ObservableSource<T> source,
Predicate<? super T> predicate) |
ObservableAnySingle(ObservableSource<T> source,
Predicate<? super T> predicate) |
ObservableFilter(ObservableSource<T> source,
Predicate<? super T> predicate) |
ObservableRetryPredicate(Observable<T> source,
long count,
Predicate<? super Throwable> predicate) |
ObservableSkipWhile(ObservableSource<T> source,
Predicate<? super T> predicate) |
ObservableTakeUntilPredicate(ObservableSource<T> source,
Predicate<? super T> predicate) |
ObservableTakeWhile(ObservableSource<T> source,
Predicate<? super T> predicate) |
Constructor and Description |
---|
ParallelFilter(ParallelFlowable<T> source,
Predicate<? super T> predicate) |
ParallelFilterTry(ParallelFlowable<T> source,
Predicate<? super T> predicate,
BiFunction<? super Long,? super Throwable,ParallelFailureHandling> errorHandler) |
Constructor and Description |
---|
ForEachWhileSubscriber(Predicate<? super T> onNext,
Consumer<? super Throwable> onError,
Action onComplete) |
Modifier and Type | Interface and Description |
---|---|
static interface |
AppendOnlyLinkedArrayList.NonThrowingPredicate<T>
Predicate interface suppressing the exception.
|
Modifier and Type | Method and Description |
---|---|
U |
BaseTestConsumer.assertError(Predicate<Throwable> errorPredicate)
Asserts that this TestObserver/TestSubscriber received exactly one onError event for which
the provided predicate returns true.
|
U |
BaseTestConsumer.assertFailure(Predicate<Throwable> errorPredicate,
T... values)
Assert that the upstream signalled the specified values in order and then failed
with a Throwable for which the provided predicate returns true.
|
U |
BaseTestConsumer.assertNever(Predicate<? super T> valuePredicate)
Asserts that this TestObserver/TestSubscriber did not receive any onNext value for which
the provided predicate returns true.
|
U |
BaseTestConsumer.assertValue(Predicate<T> valuePredicate)
Asserts that this TestObserver/TestSubscriber received exactly one onNext value for which
the provided predicate returns true.
|
U |
BaseTestConsumer.assertValueAt(int index,
Predicate<T> valuePredicate)
Asserts that this TestObserver/TestSubscriber received an onNext value at the given index
for the provided predicate returns true.
|
Modifier and Type | Method and Description |
---|---|
ParallelFlowable<T> |
ParallelFlowable.filter(Predicate<? super T> predicate)
Filters the source values on each 'rail'.
|
ParallelFlowable<T> |
ParallelFlowable.filter(Predicate<? super T> predicate,
BiFunction<? super Long,? super Throwable,ParallelFailureHandling> errorHandler)
Filters the source values on each 'rail' and
handles errors based on the returned value by the handler function.
|
ParallelFlowable<T> |
ParallelFlowable.filter(Predicate<? super T> predicate,
ParallelFailureHandling errorHandler)
Filters the source values on each 'rail' and
handles errors based on the given
ParallelFailureHandling enumeration value. |
Copyright © 2019. All rights reserved.