rx.functions.Func7 Java Examples

The following examples show how to use rx.functions.Func7. 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, R> Observable<R> toObservable(
    final Func7<T1, T2, T3, T4, T5, T6, T7, R> func,
    final T1 arg1, final T2 arg2, final T3 arg3, final T4 arg4, final T5 arg5,
    final T6 arg6, final T7 arg7) {
  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);
        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, 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, Func7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R> combineFunction) {
    return combineLatest(Arrays.asList(new Observable[]{o1, o2, o3, o4, o5, o6, o7}), 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, 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, Func7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R> zipFunction) {
    return just(new Observable[]{o1, o2, o3, o4, o5, o6, o7}).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, 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,
                                                                                           Func7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R> combineFunction) {
    return combineSinglesDelayError(asList(o1.single(), o2.single(), o3.single(), o4.single(), o5.single(), o6.single(), o7.single()), fromFunc(combineFunction));
}