This section explains operators with which you conditionally emit or transform Observables, or can do boolean evaluations of them:
Conditional Operators
amb( )— given two or more source Observables, emits all of the items from the first of these Observables to emit an itemdefaultIfEmpty( )— 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 itemsskipWhile( )— 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 notificationtakeWhile( )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-expressionspackage underrxjava-contriband is not included with the standard RxJava set of operators
Boolean Operators
all( )— determine whether all items emitted by an Observable meet some criteriacontains( )— determine whether an Observable emits a particular item or notexists( )andisEmpty( )— determine whether an Observable emits any items or notsequenceEqual( )— test the equality of the sequences emitted by two Observables