rx.functions.Func9 Java Examples

The following examples show how to use rx.functions.Func9. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RxUtils.java    From RxBinding with Apache License 2.0 6 votes vote down vote up
public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Observable<R> toObservable(
    final Func9<T1, T2, T3, T4, T5, T6, T7, T8, T9, R> func,
    final T1 arg1, final T2 arg2, final T3 arg3, final T4 arg4, final T5 arg5,
    final T6 arg6, final T7 arg7, final T8 arg8, final T9 arg9) {
  return Observable.create(new Observable.OnSubscribe<R>() {
    @Override
    public void call(Subscriber<? super R> subscriber) {
      try {
        final R result = func.call(
            arg1, arg2, arg3, arg4, arg5,
            arg6, arg7, arg8, arg9);
        onNextIfSubscribed(subscriber, result);
        onCompletedIfSubsribed(subscriber);
      } catch (Exception e) {
        onErrorIfSubscribed(subscriber, e);
      }
    }
  });
}
 
Example #2
Source File: Observable.java    From letv with Apache License 2.0 4 votes vote down vote up
public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Observable<R> combineLatest(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Observable<? extends T7> o7, Observable<? extends T8> o8, Observable<? extends T9> o9, Func9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends R> combineFunction) {
    return combineLatest(Arrays.asList(new Observable[]{o1, o2, o3, o4, o5, o6, o7, o8, o9}), Functions.fromFunc(combineFunction));
}
 
Example #3
Source File: Observable.java    From letv with Apache License 2.0 4 votes vote down vote up
public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Observable<R> zip(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Observable<? extends T7> o7, Observable<? extends T8> o8, Observable<? extends T9> o9, Func9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends R> zipFunction) {
    return just(new Observable[]{o1, o2, o3, o4, o5, o6, o7, o8, o9}).lift(new OperatorZip(zipFunction));
}
 
Example #4
Source File: RxHelper.java    From sfs with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings("unchecked")
public static final <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Observable<R> combineSinglesDelayError(Observable<? extends T1> o1, Observable<? extends T2> o2, Observable<? extends T3> o3, Observable<? extends T4> o4, Observable<? extends T5> o5, Observable<? extends T6> o6, Observable<? extends T7> o7, Observable<? extends T8> o8,
                                                                                                   Observable<? extends T9> o9,
                                                                                                   Func9<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? super T9, ? extends R> combineFunction) {
    return combineSinglesDelayError(asList(o1.single(), o2.single(), o3.single(), o4.single(), o5.single(), o6.single(), o7.single(), o8.single(), o9.single()), fromFunc(combineFunction));
}