This project is part of a series of 10 articles about RxJava operators. It is related to filtering operators. Find more on androidahead.com
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

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