Java Examples for io.reactivex.Flowable.combineLatest
The following java examples will help you to understand the usage of io.reactivex.Flowable.combineLatest. These source code samples are taken from different open source projects.
Example 1
| Project: RxJava-master File: FlowableCombineLatestTests.java View source code |
/**
* This won't compile if super/extends isn't done correctly on generics.
*/
@Test
public void testCovarianceOfCombineLatest() {
Flowable<HorrorMovie> horrors = Flowable.just(new HorrorMovie());
Flowable<CoolRating> ratings = Flowable.just(new CoolRating());
Flowable.<Movie, CoolRating, Result>combineLatest(horrors, ratings, combine).blockingForEach(action);
Flowable.<Movie, CoolRating, Result>combineLatest(horrors, ratings, combine).blockingForEach(action);
Flowable.<Media, Rating, ExtendedResult>combineLatest(horrors, ratings, combine).blockingForEach(extendedAction);
Flowable.<Media, Rating, Result>combineLatest(horrors, ratings, combine).blockingForEach(action);
Flowable.<Media, Rating, ExtendedResult>combineLatest(horrors, ratings, combine).blockingForEach(action);
Flowable.<Movie, CoolRating, Result>combineLatest(horrors, ratings, combine);
}Example 2
| Project: -master File: FlowableCombineLatestTests.java View source code |
/**
* This won't compile if super/extends isn't done correctly on generics.
*/
@Test
public void testCovarianceOfCombineLatest() {
Flowable<HorrorMovie> horrors = Flowable.just(new HorrorMovie());
Flowable<CoolRating> ratings = Flowable.just(new CoolRating());
Flowable.<Movie, CoolRating, Result>combineLatest(horrors, ratings, combine).blockingForEach(action);
Flowable.<Movie, CoolRating, Result>combineLatest(horrors, ratings, combine).blockingForEach(action);
Flowable.<Media, Rating, ExtendedResult>combineLatest(horrors, ratings, combine).blockingForEach(extendedAction);
Flowable.<Media, Rating, Result>combineLatest(horrors, ratings, combine).blockingForEach(action);
Flowable.<Media, Rating, ExtendedResult>combineLatest(horrors, ratings, combine).blockingForEach(action);
Flowable.<Movie, CoolRating, Result>combineLatest(horrors, ratings, combine);
}