Created
October 2, 2018 02:41
-
-
Save CoderJava/860e39a44be318039bc8af8ae19f9853 to your computer and use it in GitHub Desktop.
Transforming Operator Window RxJava
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class RxTransformingOperatorWindow { | |
| public static void main(String[] args) { | |
| Observable.range(1, 10) | |
| .window(3) | |
| .subscribe(longObservable -> { | |
| System.out.println("starting new window"); | |
| longObservable.subscribe(aLong -> System.out.println("window item " + aLong), | |
| throwable -> System.out.println("window error"), | |
| () -> System.out.println("window completed") | |
| ); | |
| }, throwable -> System.out.println("onError"), | |
| () -> System.out.println("onCompleted")); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment