Elements of the diagram

The following diagram can be found at http://reactivex.io/documentation/observable.html. It contains the core elements that will be necessary to understand the marble diagrams, so let's dig into it:

The following line represents an initial Observable with items that will be emitted as time passes:

For example, the equivalent in code will be as follows:

Observable.just(new Star(), new Triangle(), new Pentagon(), new 
Circle(), new Square(), new Diamond())

The items that are being emitted are represented by the elements on the line (a star, a triangle, and so on). The operation that is being applied is represented by this:

It can be called like this:
Observable.just(...)
.flip(...)

This will result in an Observable that will emit the following:

The flip operation changed the rotation of each element. Consider the following:

It changed to become as follows:

If the sequence finishes normally (.onComplete()), that action is represented by the following symbol:

However, if it terminates abruptly (with an .onError() call), the following symbol is used to show this:

Having covered these basics, we can now continue with the examples; however, before that, let's take a look at the RxMarbles tool.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.160.181