Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created August 19, 2018 10:32
Show Gist options
  • Save anitaa1990/446350dea0e6c19a1e0fc461ddeed2d8 to your computer and use it in GitHub Desktop.
Save anitaa1990/446350dea0e6c19a1e0fc461ddeed2d8 to your computer and use it in GitHub Desktop.
Observable<Integer> observable1 = Observable
.just(1, 2, 3, 4, 5, 6);
Observable<Integer> observable2 = Observable
.just(1, 2, 3, 4, 5, 6);
Observable.sequenceEqual(observable1, observable2)
.subscribe(new SingleObserver<Boolean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onSuccess(Boolean aBoolean) {
System.out.println("Are the two sequences equal: " + 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