Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created August 19, 2018 10:18
Show Gist options
  • Save anitaa1990/d95bfd5b5e6911c67384d233f9277251 to your computer and use it in GitHub Desktop.
Save anitaa1990/d95bfd5b5e6911c67384d233f9277251 to your computer and use it in GitHub Desktop.
Observable.just(1, 2, 3, 4, 5, 6)
.contains(10)
.subscribe(new SingleObserver<Boolean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(Boolean aBoolean) {
System.out.println("Does list contain value 10: " + aBoolean);
}
@Override
public void onError(Throwable e) {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment