O'Reilly logo

Learning Reactive Programming with Java 8 by Nickolay Tsvetinov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The conditional operators

It is possible to make it so that one Observable instance won't begin its emissions until another emits, or so that it would emit only if another doesn't emit anything. These Observable instances are able to emit items under given conditions, and these conditions are applied to them using conditional operators. In this section, we'll take a look at some of the conditional operators provided by RxJava.

The amb operator

The amb() operator has overloads that take from two up to nine source Observable instances or an Iterable instance of the Observable instances. It emits the items of the source Observable instance that starts emitting first. It doesn't matter what this is, whether OnError, OnCompleted notification, or data. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required