Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 1.19 KB

File metadata and controls

34 lines (21 loc) · 1.19 KB

FilteringOperatorsPart1

This project is part of a series of 10 articles about RxJava operators.

In this project you will find some examples of filtering operators. Basically, filtering operators are those we can use to selectively emit items from a source Observable. Some of them are very similar to each other, so, it is important to know their nuances, otherwise we may make wrong assumptions.

As an example of these similarities, we can take first(), firstOrDefault() and takeFirst() operators. Although they are quite similar, they differ when no item is emitted by the source Observable.

Here is a list of all operators available in this project:

  • first()
  • first() with predicate
  • firstOrDefault()
  • takeFirst()
  • single()
  • singleOrDefault()
  • elementAt()
  • last()
  • lastOrDefault()
  • take()
  • takeLast()
  • filter()

Please, refer to this article for detailed information.

Demo

License

This project is licensed under the MIT License - see the LICENSE file for details