Class OnSubscribeAmb<T>

java.lang.Object
rx.internal.operators.OnSubscribeAmb<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
Action, Action1<Subscriber<? super T>>, Function, Observable.OnSubscribe<T>

public final class OnSubscribeAmb<T> extends Object implements Observable.OnSubscribe<T>
Given multiple Observables, propagates the one that first emits an item.
  • Field Details

  • Constructor Details

  • Method Details

    • amb

      public static <T> Observable.OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2)
      Given two Observables, propagates the one that first emits an item.
      Type Parameters:
      T - the common value base type
      Parameters:
      o1 - the first Observable
      o2 - the second Observable
      Returns:
      an Observable that mirrors the one of the source Observables that was first to emit an item
    • amb

      public static <T> Observable.OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3)
      Given three Observables, propagates the one that first emits an item.
      Type Parameters:
      T - the common value base type
      Parameters:
      o1 - the first Observable
      o2 - the second Observable
      o3 - the third Observable
      Returns:
      an Observable that mirrors the one of the source Observables that was first to emit an item
    • amb

      public static <T> Observable.OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4)
      Given four Observables, propagates the one that first emits an item.
      Type Parameters:
      T - the common value base type
      Parameters:
      o1 - the first Observable
      o2 - the second Observable
      o3 - the third Observable
      o4 - the fourth Observable
      Returns:
      an Observable that mirrors the one of the source Observables that was first to emit an item
    • amb

      public static <T> Observable.OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5)
      Given five Observables, propagates the one that first emits an item.
      Type Parameters:
      T - the common value base type
      Parameters:
      o1 - the first Observable
      o2 - the second Observable
      o3 - the third Observable
      o4 - the fourth Observable
      o5 - the fifth Observable
      Returns:
      an Observable that mirrors the one of the source Observables that was first to emit an item
    • amb

      public static <T> Observable.OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6)
      Given six Observables, propagates the one that first emits an item.
      Type Parameters:
      T - the common value base type
      Parameters:
      o1 - the first Observable
      o2 - the second Observable
      o3 - the third Observable
      o4 - the fourth Observable
      o5 - the fifth Observable
      o6 - the sixth Observable
      Returns:
      an Observable that mirrors the one of the source Observables that was first to emit an item
    • amb

      public static <T> Observable.OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6, Observable<? extends T> o7)
      Given seven Observables, propagates the one that first emits an item.
      Type Parameters:
      T - the common value base type
      Parameters:
      o1 - the first Observable
      o2 - the second Observable
      o3 - the third Observable
      o4 - the fourth Observable
      o5 - the fifth Observable
      o6 - the sixth Observable
      o7 - the seventh Observable
      Returns:
      an Observable that mirrors the one of the source Observables that was first to emit an item
    • amb

      public static <T> Observable.OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6, Observable<? extends T> o7, Observable<? extends T> o8)
      Given eight Observables, propagates the one that first emits an item.
      Type Parameters:
      T - the common value base type
      Parameters:
      o1 - the first Observable
      o2 - the second Observable
      o3 - the third Observable
      o4 - the fourth Observable
      o5 - the fifth Observable
      o6 - the sixth Observable
      o7 - the seventh Observable
      o8 - the eighth Observable
      Returns:
      an Observable that mirrors the one of the source Observables that was first to emit an item
    • amb

      public static <T> Observable.OnSubscribe<T> amb(Observable<? extends T> o1, Observable<? extends T> o2, Observable<? extends T> o3, Observable<? extends T> o4, Observable<? extends T> o5, Observable<? extends T> o6, Observable<? extends T> o7, Observable<? extends T> o8, Observable<? extends T> o9)
      Given nine Observables, propagates the one that first emits an item.
      Type Parameters:
      T - the common value base type
      Parameters:
      o1 - the first Observable
      o2 - the second Observable
      o3 - the third Observable
      o4 - the fourth Observable
      o5 - the fifth Observable
      o6 - the sixth Observable
      o7 - the seventh Observable
      o8 - the eighth Observable
      o9 - the ninth Observable
      Returns:
      an Observable that mirrors the one of the source Observables that was first to emit an item
    • amb

      public static <T> Observable.OnSubscribe<T> amb(Iterable<? extends Observable<? extends T>> sources)
      Given a set of Observables, propagates the one that first emits an item.
      Type Parameters:
      T - the common value base type
      Parameters:
      sources - an Iterable of Observables
      Returns:
      an Observable that mirrors the one of the Observables in sources that was the first to emit an item
    • call

      public void call(Subscriber<? super T> subscriber)
      Specified by:
      call in interface Action1<T>
    • unsubscribeAmbSubscribers

      static <T> void unsubscribeAmbSubscribers(Collection<OnSubscribeAmb.AmbSubscriber<T>> ambSubscribers)