Uses of Interface
io.reactivex.rxjava3.functions.Predicate
Packages that use Predicate
Package
Description
Base reactive classes:
Flowable
, Observable
,
Single
, Maybe
and
Completable
; base reactive consumers;
other common base interfaces.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.Contains the base type
ParallelFlowable
,
a sub-DSL for working with Flowable
sequences in parallel.Classes representing so-called hot backpressure-aware sources, aka processors,
that implement the
FlowableProcessor
class,
the Reactive Streams Processor
interface
to allow forms of multicasting events to one or more subscribers as well as consuming another
Reactive Streams Publisher
.Classes representing so-called hot sources, aka subjects, that implement a base reactive class and
the respective consumer type at once to allow forms of multicasting events to multiple
consumers as well as consuming another base reactive type of their kind.
-
Uses of Predicate in io.reactivex.rxjava3.core
Methods in io.reactivex.rxjava3.core with parameters of type PredicateModifier and TypeMethodDescriptionReturns aSingle
that emitstrue
if any item emitted by the currentFlowable
satisfies a specified condition, otherwisefalse
.Returns aSingle
that emitstrue
if any item emitted by the currentObservable
satisfies a specified condition, otherwisefalse
.Filters items emitted by the currentFlowable
by only emitting those that satisfy a specified predicate.Filters the success item of theMaybe
via a predicate function and emitting it if the predicate returnstrue
, completing otherwise.final @NonNull Observable
<T> Filters items emitted by the currentObservable
by only emitting those that satisfy a specifiedPredicate
.Filters the success item of theSingle
via a predicate function and emitting it if the predicate returnstrue
, completing otherwise.final @NonNull Disposable
Flowable.forEachWhile
(@NonNull Predicate<? super @NonNull T> onNext) Subscribes to the currentFlowable
and receives notifications for each element until theonNext
Predicate returnsfalse
.final @NonNull Disposable
Flowable.forEachWhile
(@NonNull Predicate<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError) Subscribes to the currentFlowable
and receives notifications for each element and error events until theonNext
Predicate returnsfalse
.final @NonNull Disposable
Flowable.forEachWhile
(@NonNull Predicate<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError, @NonNull Action onComplete) Subscribes to the currentFlowable
and receives notifications for each element and the terminal events until theonNext
Predicate returnsfalse
.final @NonNull Disposable
Observable.forEachWhile
(@NonNull Predicate<? super @NonNull T> onNext) Subscribes to theObservableSource
and calls aPredicate
for each item of the currentObservable
, on its emission thread, until the predicate returnsfalse
.final @NonNull Disposable
Observable.forEachWhile
(@NonNull Predicate<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError) Subscribes to theObservableSource
and calls aPredicate
for each item or aConsumer
with the error of the currentObservable
, on their original emission threads, until the predicate returnsfalse
.final @NonNull Disposable
Observable.forEachWhile
(@NonNull Predicate<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError, @NonNull Action onComplete) Subscribes to theObservableSource
and calls aPredicate
for each item, aConsumer
with the error or anAction
upon completion of the currentObservable
, on their original emission threads, until the predicate returnsfalse
.final @NonNull Completable
Completable.onErrorComplete
(@NonNull Predicate<? super Throwable> predicate) Flowable.onErrorComplete
(@NonNull Predicate<? super Throwable> predicate) Returns aFlowable
instance that if the currentFlowable
emits an error and the predicate returnstrue
, it will emit anonComplete
and swallow the throwable.Maybe.onErrorComplete
(@NonNull Predicate<? super Throwable> predicate) Returns aMaybe
instance that if thisMaybe
emits an error and the predicate returnstrue
, it will emit anonComplete
and swallow the throwable.final @NonNull Observable
<T> Observable.onErrorComplete
(@NonNull Predicate<? super Throwable> predicate) Returns anObservable
instance that if the currentObservable
emits an error and the predicate returnstrue
, it will emit anonComplete
and swallow the throwable.Single.onErrorComplete
(@NonNull Predicate<? super Throwable> predicate) Returns aMaybe
instance that if thisSingle
emits an error and the predicate returnstrue
, it will emit anonComplete
and swallow the throwable.final @NonNull Completable
Returns aCompletable
that when thisCompletable
emits an error, retries at most times or until the predicate returnsfalse
, whichever happens first and emitting the last error.final @NonNull Completable
Returns aCompletable
that when thisCompletable
emits an error, calls the given predicate with the latestThrowable
to decide whether to resubscribe to the upstream or not.Retries at most times or until the predicate returnsfalse
, whichever happens first.Retries the currentFlowable
if the predicate returnstrue
.Retries at mosttimes
or until the predicate returnsfalse
, whichever happens first.Retries the currentMaybe
if it fails and the predicate returnstrue
.final @NonNull Observable
<T> Retries at most times or until the predicate returnsfalse
, whichever happens first.final @NonNull Observable
<T> Retries the currentObservable
if the predicate returnstrue
.Repeatedly re-subscribe at most times or until the predicate returnsfalse
, whichever happens first if it fails with anonError
.Re-subscribe to the currentSingle
if the given predicate returnstrue
when theSingle
fails with anonError
.Returns aFlowable
that skips all items emitted by the currentFlowable
as long as a specified condition holdstrue
, but emits all further source items as soon as the condition becomesfalse
.final @NonNull Observable
<T> Returns anObservable
that skips all items emitted by the currentObservable
as long as a specified condition holdstrue
, but emits all further source items as soon as the condition becomesfalse
.Returns aFlowable
that emits items emitted by the currentFlowable
, checks the specified predicate for each item, and then completes when the condition is satisfied.final @NonNull Observable
<T> Returns anObservable
that emits items emitted by the currentObservable
, checks the specified predicate for each item, and then completes when the condition is satisfied.Returns aFlowable
that emits items emitted by the currentFlowable
so long as each item satisfied a specified condition, and then completes as soon as this condition is not satisfied.final @NonNull Observable
<T> Returns anObservable
that emits items emitted by the currentObservable
so long as each item satisfied a specified condition, and then completes as soon as this condition is not satisfied. -
Uses of Predicate in io.reactivex.rxjava3.internal.functions
Classes in io.reactivex.rxjava3.internal.functions that implement PredicateModifier and TypeClassDescription(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
Fields in io.reactivex.rxjava3.internal.functions declared as PredicateMethods in io.reactivex.rxjava3.internal.functions that return PredicateModifier and TypeMethodDescriptionFunctions.alwaysFalse()
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) -
Uses of Predicate in io.reactivex.rxjava3.internal.observers
Fields in io.reactivex.rxjava3.internal.observers declared as PredicateConstructors in io.reactivex.rxjava3.internal.observers with parameters of type Predicate -
Uses of Predicate in io.reactivex.rxjava3.internal.operators.completable
Fields in io.reactivex.rxjava3.internal.operators.completable declared as PredicateModifier and TypeFieldDescriptionCompletableOnErrorComplete.OnError.predicate
CompletableOnErrorComplete.predicate
Constructors in io.reactivex.rxjava3.internal.operators.completable with parameters of type PredicateModifierConstructorDescriptionCompletableOnErrorComplete
(CompletableSource source, Predicate<? super Throwable> predicate) (package private)
OnError
(CompletableObserver observer, Predicate<? super Throwable> predicate) -
Uses of Predicate in io.reactivex.rxjava3.internal.operators.flowable
Fields in io.reactivex.rxjava3.internal.operators.flowable declared as PredicateModifier and TypeFieldDescriptionFlowableFilter.FilterConditionalSubscriber.filter
FlowableFilter.FilterSubscriber.filter
FlowableAll.AllSubscriber.predicate
FlowableAll.predicate
FlowableAllSingle.AllSubscriber.predicate
FlowableAllSingle.predicate
FlowableAny.AnySubscriber.predicate
FlowableAny.predicate
FlowableAnySingle.AnySubscriber.predicate
FlowableAnySingle.predicate
FlowableFilter.predicate
FlowableOnErrorComplete.OnErrorCompleteSubscriber.predicate
FlowableOnErrorComplete.predicate
FlowableRetryPredicate.predicate
FlowableRetryPredicate.RetrySubscriber.predicate
FlowableSkipWhile.predicate
FlowableSkipWhile.SkipWhileSubscriber.predicate
FlowableTakeUntilPredicate.InnerSubscriber.predicate
FlowableTakeUntilPredicate.predicate
FlowableTakeWhile.predicate
FlowableTakeWhile.TakeWhileSubscriber.predicate
Constructors in io.reactivex.rxjava3.internal.operators.flowable with parameters of type PredicateModifierConstructorDescription(package private)
AllSubscriber
(org.reactivestreams.Subscriber<? super Boolean> actual, Predicate<? super T> predicate) (package private)
AllSubscriber
(SingleObserver<? super Boolean> actual, Predicate<? super T> predicate) (package private)
AnySubscriber
(org.reactivestreams.Subscriber<? super Boolean> actual, Predicate<? super T> predicate) (package private)
AnySubscriber
(SingleObserver<? super Boolean> actual, Predicate<? super T> predicate) (package private)
FilterConditionalSubscriber
(ConditionalSubscriber<? super T> actual, Predicate<? super T> filter) (package private)
FilterSubscriber
(org.reactivestreams.Subscriber<? super T> actual, Predicate<? super T> filter) 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) FlowableOnErrorComplete
(Flowable<T> source, Predicate<? super Throwable> 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) (package private)
InnerSubscriber
(org.reactivestreams.Subscriber<? super T> actual, Predicate<? super T> predicate) OnErrorCompleteSubscriber
(org.reactivestreams.Subscriber<? super T> actual, Predicate<? super Throwable> predicate) (package private)
RetrySubscriber
(org.reactivestreams.Subscriber<? super T> actual, long count, Predicate<? super Throwable> predicate, SubscriptionArbiter sa, org.reactivestreams.Publisher<? extends T> source) (package private)
SkipWhileSubscriber
(org.reactivestreams.Subscriber<? super T> actual, Predicate<? super T> predicate) (package private)
TakeWhileSubscriber
(org.reactivestreams.Subscriber<? super T> actual, Predicate<? super T> predicate) -
Uses of Predicate in io.reactivex.rxjava3.internal.operators.maybe
Fields in io.reactivex.rxjava3.internal.operators.maybe declared as PredicateModifier and TypeFieldDescriptionMaybeFilter.FilterMaybeObserver.predicate
MaybeFilter.predicate
MaybeFilterSingle.FilterMaybeObserver.predicate
MaybeFilterSingle.predicate
MaybeOnErrorComplete.OnErrorCompleteMultiObserver.predicate
MaybeOnErrorComplete.predicate
Constructors in io.reactivex.rxjava3.internal.operators.maybe with parameters of type PredicateModifierConstructorDescription(package private)
FilterMaybeObserver
(MaybeObserver<? super T> actual, Predicate<? super T> predicate) (package private)
FilterMaybeObserver
(MaybeObserver<? super T> actual, Predicate<? super T> predicate) MaybeFilter
(MaybeSource<T> source, Predicate<? super T> predicate) MaybeFilterSingle
(SingleSource<T> source, Predicate<? super T> predicate) MaybeOnErrorComplete
(MaybeSource<T> source, Predicate<? super Throwable> predicate) OnErrorCompleteMultiObserver
(MaybeObserver<? super T> actual, Predicate<? super Throwable> predicate) -
Uses of Predicate in io.reactivex.rxjava3.internal.operators.observable
Fields in io.reactivex.rxjava3.internal.operators.observable declared as PredicateModifier and TypeFieldDescriptionObservableFilter.FilterObserver.filter
ObservableAll.AllObserver.predicate
ObservableAll.predicate
ObservableAllSingle.AllObserver.predicate
ObservableAllSingle.predicate
ObservableAny.AnyObserver.predicate
ObservableAny.predicate
ObservableAnySingle.AnyObserver.predicate
ObservableAnySingle.predicate
ObservableFilter.predicate
ObservableOnErrorComplete.OnErrorCompleteObserver.predicate
ObservableOnErrorComplete.predicate
ObservableRetryPredicate.predicate
ObservableRetryPredicate.RepeatObserver.predicate
ObservableSkipWhile.predicate
ObservableSkipWhile.SkipWhileObserver.predicate
ObservableTakeUntilPredicate.predicate
ObservableTakeUntilPredicate.TakeUntilPredicateObserver.predicate
ObservableTakeWhile.predicate
ObservableTakeWhile.TakeWhileObserver.predicate
Constructors in io.reactivex.rxjava3.internal.operators.observable with parameters of type PredicateModifierConstructorDescription(package private)
AllObserver
(Observer<? super Boolean> actual, Predicate<? super T> predicate) (package private)
AllObserver
(SingleObserver<? super Boolean> actual, Predicate<? super T> predicate) (package private)
AnyObserver
(Observer<? super Boolean> actual, Predicate<? super T> predicate) (package private)
AnyObserver
(SingleObserver<? super Boolean> actual, Predicate<? super T> predicate) (package private)
FilterObserver
(Observer<? super T> actual, Predicate<? super T> filter) 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) ObservableOnErrorComplete
(ObservableSource<T> source, Predicate<? super Throwable> 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) OnErrorCompleteObserver
(Observer<? super T> actual, Predicate<? super Throwable> predicate) (package private)
RepeatObserver
(Observer<? super T> actual, long count, Predicate<? super Throwable> predicate, SequentialDisposable sa, ObservableSource<? extends T> source) (package private)
SkipWhileObserver
(Observer<? super T> actual, Predicate<? super T> predicate) (package private)
TakeUntilPredicateObserver
(Observer<? super T> downstream, Predicate<? super T> predicate) (package private)
TakeWhileObserver
(Observer<? super T> actual, Predicate<? super T> predicate) -
Uses of Predicate in io.reactivex.rxjava3.internal.operators.parallel
Fields in io.reactivex.rxjava3.internal.operators.parallel declared as PredicateModifier and TypeFieldDescriptionParallelFilter.BaseFilterSubscriber.predicate
ParallelFilter.predicate
ParallelFilterTry.BaseFilterSubscriber.predicate
ParallelFilterTry.predicate
Constructors in io.reactivex.rxjava3.internal.operators.parallel with parameters of type PredicateModifierConstructorDescription(package private)
BaseFilterSubscriber
(Predicate<? super T> predicate) (package private)
BaseFilterSubscriber
(Predicate<? super T> predicate, BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler) ParallelFilter
(ParallelFlowable<T> source, Predicate<? super T> predicate) (package private)
ParallelFilterConditionalSubscriber
(ConditionalSubscriber<? super T> actual, Predicate<? super T> predicate) (package private)
ParallelFilterConditionalSubscriber
(ConditionalSubscriber<? super T> actual, Predicate<? super T> predicate, BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler) (package private)
ParallelFilterSubscriber
(org.reactivestreams.Subscriber<? super T> actual, Predicate<? super T> predicate) (package private)
ParallelFilterSubscriber
(org.reactivestreams.Subscriber<? super T> actual, Predicate<? super T> predicate, BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler) ParallelFilterTry
(ParallelFlowable<T> source, Predicate<? super T> predicate, BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> errorHandler) -
Uses of Predicate in io.reactivex.rxjava3.internal.operators.single
Fields in io.reactivex.rxjava3.internal.operators.single declared as PredicateConstructors in io.reactivex.rxjava3.internal.operators.single with parameters of type PredicateModifierConstructorDescriptionSingleOnErrorComplete
(Single<T> source, Predicate<? super Throwable> predicate) -
Uses of Predicate in io.reactivex.rxjava3.internal.subscribers
Fields in io.reactivex.rxjava3.internal.subscribers declared as PredicateConstructors in io.reactivex.rxjava3.internal.subscribers with parameters of type Predicate -
Uses of Predicate in io.reactivex.rxjava3.internal.util
Subinterfaces of Predicate in io.reactivex.rxjava3.internal.utilModifier and TypeInterfaceDescriptionstatic interface
Predicate interface suppressing the exception. -
Uses of Predicate in io.reactivex.rxjava3.observers
Methods in io.reactivex.rxjava3.observers with parameters of type PredicateModifier and TypeMethodDescriptionfinal U
BaseTestConsumer.assertError
(@NonNull Predicate<Throwable> errorPredicate) Asserts that thisTestObserver
/TestSubscriber
received exactly oneonError
event for which the provided predicate returnstrue
.private U
BaseTestConsumer.assertError
(@NonNull Predicate<Throwable> errorPredicate, boolean exact) final U
BaseTestConsumer.assertValue
(@NonNull Predicate<T> valuePredicate) Asserts that thisTestObserver
/TestSubscriber
received exactly oneonNext
value for which the provided predicate returnstrue
.final U
BaseTestConsumer.assertValueAt
(int index, @NonNull Predicate<T> valuePredicate) Asserts that thisTestObserver
/TestSubscriber
received anonNext
value at the given index for the provided predicate returnstrue
. -
Uses of Predicate in io.reactivex.rxjava3.parallel
Methods in io.reactivex.rxjava3.parallel with parameters of type PredicateModifier and TypeMethodDescriptionfinal @NonNull ParallelFlowable
<T> Filters the source values on each 'rail'.final @NonNull ParallelFlowable
<T> ParallelFlowable.filter
(@NonNull Predicate<? super @NonNull T> predicate, @NonNull 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.final @NonNull ParallelFlowable
<T> ParallelFlowable.filter
(@NonNull Predicate<? super @NonNull T> predicate, @NonNull ParallelFailureHandling errorHandler) Filters the source values on each 'rail' and handles errors based on the givenParallelFailureHandling
enumeration value. -
Uses of Predicate in io.reactivex.rxjava3.processors
Classes in io.reactivex.rxjava3.processors that implement PredicateModifier and TypeClassDescription(package private) static final class
-
Uses of Predicate in io.reactivex.rxjava3.subjects
Classes in io.reactivex.rxjava3.subjects that implement PredicateModifier and TypeClassDescription(package private) static final class
(package private) final class
Serializes calls to the Observer methods.