Created
July 25, 2014 18:54
-
-
Save weefbellington/29acf66587e22a97039e to your computer and use it in GitHub Desktop.
rxjava zip example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Action1 onNext = new Action1<R>() { | |
@Override | |
public void call(R composedResult) { | |
//do something | |
} | |
}; | |
Observable.zip(observable1, observable2, | |
new Func2<T1, T2, R) { | |
@Override | |
public Result<T> call(T1 arg1, T2 arg2) { | |
// do something with the return values and compose them into type R | |
return R; | |
} | |
}).subscribe(onNext); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment