Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created August 18, 2018 17:25
Show Gist options
  • Save anitaa1990/d5e3104ef1df2cfac9902f55eefb5ec9 to your computer and use it in GitHub Desktop.
Save anitaa1990/d5e3104ef1df2cfac9902f55eefb5ec9 to your computer and use it in GitHub Desktop.
Observable.just(10, 20, 20, 10, 30, 40, 70, 60, 70)
.distinct()
.subscribe(new Observer<Integer>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(Integer integer) {
System.out.println("onNext: " + integer);
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment