Skip to content

Instantly share code, notes, and snippets.

@oehme
Last active August 29, 2015 14:04
Show Gist options
  • Save oehme/952d0c3c8dd55f3f1ebc to your computer and use it in GitHub Desktop.
Save oehme/952d0c3c8dd55f3f1ebc to your computer and use it in GitHub Desktop.
Defining custom operators on Observable
def static <T> myOperator(Observable<T> observable) {
observable.lift(new MyOperator)
}
def static void main(String[] args) {
Observable.just("Foo").myOperator
//instead of
Observable.just("Foo").lift(new MyOperator)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment