Skip to content

Instantly share code, notes, and snippets.

@selmanon
Created September 19, 2018 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selmanon/2dadf5ce87b1ec3048c10cb772d43304 to your computer and use it in GitHub Desktop.
Save selmanon/2dadf5ce87b1ec3048c10cb772d43304 to your computer and use it in GitHub Desktop.
Observable
.just(1, 2, 3, 4, 5)
.filter(integer -> integer % 2 != 0)
.subscribe(
integer -> Log.i(TAG, String.valueOf(integer)),
error -> Log.e(TAG, "Error"),
() -> Log.i(TAG, "No more results")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment