Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created August 19, 2018 11:33
Show Gist options
  • Save anitaa1990/bebb610c0a541a1d727808ad90814970 to your computer and use it in GitHub Desktop.
Save anitaa1990/bebb610c0a541a1d727808ad90814970 to your computer and use it in GitHub Desktop.
Observable<Integer> observable = Observable.just(1, 2, 3, 4, 5);
MathObservable
.max(observable)
.subscribe(new Observer<Integer>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(Integer integer) {
System.out.println("Max value: " + 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