Functional types
Here are all the functional types available in RxJava 2.0 at the time of writing this, and you can find them in the io.reactivex.functions package. You may recognize many of these functional types as being almost identical to those in Java 8 (in java.util.function) or Google Guava. However, they were somewhat copied in RxJava 2.0 to make them available for use in Java 6 and 7. A subtle difference is that RxJava's implementations throw checked exceptions. This eliminates a pain point from RxJava 1.0 where checked exceptions had to be handled in lambdas that yielded them.
The RxJava 1.0 equivalents are listed as well, but note that the single abstract method (SAM) column corresponds to the RxJava 2.0 type. RxJava 1.0 functions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access