Beispiel #1
0
 private Throwable disposeEagerlyIfRequested(final Action0 disposeOnceOnly) {
   if (disposeEagerly)
     try {
       disposeOnceOnly.call();
       return null;
     } catch (Throwable e) {
       return e;
     }
   else return null;
 }
  @Override
  protected void match() {
    if (!jo1.queue().isEmpty()
        && !jo2.queue().isEmpty()
        && !jo3.queue().isEmpty()
        && !jo4.queue().isEmpty()
        && !jo5.queue().isEmpty()
        && !jo6.queue().isEmpty()
        && !jo7.queue().isEmpty()) {
      Notification<T1> n1 = jo1.queue().peek();
      Notification<T2> n2 = jo2.queue().peek();
      Notification<T3> n3 = jo3.queue().peek();
      Notification<T4> n4 = jo4.queue().peek();
      Notification<T5> n5 = jo5.queue().peek();
      Notification<T6> n6 = jo6.queue().peek();
      Notification<T7> n7 = jo7.queue().peek();

      if (n1.isOnCompleted()
          || n2.isOnCompleted()
          || n3.isOnCompleted()
          || n4.isOnCompleted()
          || n5.isOnCompleted()
          || n6.isOnCompleted()
          || n7.isOnCompleted()) {
        onCompleted.call();
      } else {
        dequeue();
        onNext.call(
            n1.getValue(),
            n2.getValue(),
            n3.getValue(),
            n4.getValue(),
            n5.getValue(),
            n6.getValue(),
            n7.getValue());
      }
    }
  }