-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conditional and Boolean Operators
David Gross edited this page Jan 12, 2015
·
28 revisions
This section explains operators with which you conditionally emit or transform Observables, or can do boolean evaluations of them:
-
amb( )
— given two or more source Observables, emits all of the items from the first of these Observables to emit an item -
defaultIfEmpty( )
— emit items from the source Observable, or emit a default item if the source Observable completes after emitting no items - (
rxjava-computation-expressions
)doWhile( )
— emit the source Observable's sequence, and then repeat the sequence as long as a condition remains true - (
rxjava-computation-expressions
)ifThen( )
— only emit the source Observable's sequence if a condition is true, otherwise emit an empty or default sequence -
skipUntil( )
— discard items emitted by a source Observable until a second Observable emits an item, then emit the remainder of the source Observable's items -
skipWhile( )
— discard items emitted by an Observable until a specified condition is false, then emit the remainder - (
rxjava-computation-expressions
)switchCase( )
— emit the sequence from a particular Observable based on the results of an evaluation -
takeUntil( )
— emits the items from the source Observable until a second Observable emits an item or issues a notification -
takeWhile( )
andtakeWhileWithIndex( )
— emit items emitted by an Observable as long as a specified condition is true, then skip the remainder - (
rxjava-computation-expressions
)whileDo( )
— if a condition is true, emit the source Observable's sequence and then repeat the sequence as long as the condition remains true
(
rxjava-computation-expressions
) — indicates that this operator is currently part of the optionalrxjava-computation-expressions
package underrxjava-contrib
and is not included with the standard RxJava set of operators
-
all( )
— determine whether all items emitted by an Observable meet some criteria -
contains( )
— determine whether an Observable emits a particular item or not -
exists( )
andisEmpty( )
— determine whether an Observable emits any items or not -
sequenceEqual( )
— test the equality of the sequences emitted by two Observables
Copyright (c) 2016-present, RxJava Contributors.
Twitter @RxJava | Gitter @RxJava