本文整理汇总了Java中rx.functions.Func5类的典型用法代码示例。如果您正苦于以下问题:Java Func5类的具体用法?Java Func5怎么用?Java Func5使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Func5类属于rx.functions包,在下文中一共展示了Func5类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: test5SourcesOverload
import rx.functions.Func5; //导入依赖的package包/类
@Test
public void test5SourcesOverload() {
Observable<Integer> s1 = Observable.just(1);
Observable<Integer> s2 = Observable.just(2);
Observable<Integer> s3 = Observable.just(3);
Observable<Integer> s4 = Observable.just(4);
Observable<Integer> s5 = Observable.just(5);
Observable<List<Integer>> result = Observable.combineLatest(s1, s2, s3, s4, s5,
new Func5<Integer, Integer, Integer, Integer, Integer, List<Integer>>() {
@Override
public List<Integer> call(Integer t1, Integer t2, Integer t3, Integer t4, Integer t5) {
return Arrays.asList(t1, t2, t3, t4, t5);
}
});
@SuppressWarnings("unchecked")
Observer<Object> o = mock(Observer.class);
result.subscribe(o);
verify(o).onNext(Arrays.asList(1, 2, 3, 4, 5));
verify(o).onComplete();
verify(o, never()).onError(any(Throwable.class));
}
开发者ID:akarnokd,项目名称:RxJavaFlow,代码行数:26,代码来源:OnSubscribeCombineLatestTest.java
示例2: combineLatest
import rx.functions.Func5; //导入依赖的package包/类
public static <T1, T2, T3, T4, T5, R> Observable<R> combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Func5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> combineFunction) {
return combineLatest(Arrays.asList(new Observable[]{o1, o2, o3, o4, o5}), Functions.fromFunc(combineFunction));
}
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:Observable.java
示例3: zip
import rx.functions.Func5; //导入依赖的package包/类
public static <T1, T2, T3, T4, T5, R> Observable<R> zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Func5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> zipFunction) {
return just(new Observable[]{o1, o2, o3, o4, o5}).lift(new OperatorZip(zipFunction));
}
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:Observable.java
示例4: zip
import rx.functions.Func5; //导入依赖的package包/类
public static final <T1, T2, T3, T4, T5, R> Single<R> zip(Single<? extends T1> o1, Single<? extends T2> o2, Single<? extends T3> o3, Single<? extends T4> o4, Single<? extends T5> o5, Func5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> zipFunction) {
return just(new Observable[]{asObservable(o1), asObservable(o2), asObservable(o3), asObservable(o4), asObservable(o5)}).lift(new OperatorZip((Func5) zipFunction));
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:Single.java
示例5: OperatorZip
import rx.functions.Func5; //导入依赖的package包/类
public OperatorZip(Func5 f) {
this.zipFunction = Functions.fromFunc(f);
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:OperatorZip.java
示例6: combineLatest
import rx.functions.Func5; //导入依赖的package包/类
public static final <T1, T2, T3, T4, T5, R> Observable<R> combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Func5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> combineFunction) {
return combineLatest(Arrays.asList(new Observable[]{o1, o2, o3, o4, o5}), Functions.fromFunc(combineFunction));
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:Observable.java
示例7: zip
import rx.functions.Func5; //导入依赖的package包/类
public static final <T1, T2, T3, T4, T5, R> Observable<R> zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Func5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> zipFunction) {
return just(new Observable[]{o1, o2, o3, o4, o5}).lift(new OperatorZip(zipFunction));
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:Observable.java
示例8: combineSinglesDelayError
import rx.functions.Func5; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static final <T1, T2, T3, T4, T5, R> Observable<R> combineSinglesDelayError(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5,
Func5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> combineFunction) {
return combineSinglesDelayError(asList(o1.single(), o2.single(), o3.single(), o4.single(), o5.single()), fromFunc(combineFunction));
}
开发者ID:pitchpoint-solutions,项目名称:sfs,代码行数:6,代码来源:RxHelper.java
示例9: OperatorZip
import rx.functions.Func5; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public OperatorZip(Func5 f) {
this.zipFunction = Functions.fromFunc(f);
}
开发者ID:akarnokd,项目名称:RxJavaFlow,代码行数:5,代码来源:OperatorZip.java
注:本文中的rx.functions.Func5类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论