In the first chapter's reactive sum example, we were filtering the user input, based on a special pattern. The pattern was, for example, a: <number>. It is common to filter only interesting bits of data from the data stream. For example, it's useful to filter out <enter> key-down events only from all key-down events, or only lines containing a given expression from a file. That's why it is important to not only be able to transform our data but also to learn how to filter it.
There are many filtering operators in RxJava. The most important of these operators is
filter(). Its marble diagram is very simple and is shown here:
It shows ...