Class OperatorMapPair<T,​U,​R>

  • Type Parameters:
    T - the type of items emitted by the source Observable
    U - the type of items emitted by the derived Observables
    R - the type of items to be emitted by this Operator
    All Implemented Interfaces:
    Func1<Subscriber<? super Observable<? extends R>>,​Subscriber<? super T>>, Function, Observable.Operator<Observable<? extends R>,​T>

    public final class OperatorMapPair<T,​U,​R>
    extends java.lang.Object
    implements Observable.Operator<Observable<? extends R>,​T>
    An Observable.Operator that pairs up items emitted by a source Observable with the sequence of items emitted by the Observable that is derived from each item by means of a selector, and emits the results of this pairing.
    • Field Detail

      • collectionSelector

        final Func1<? super T,​? extends Observable<? extends U>> collectionSelector
      • resultSelector

        final Func2<? super T,​? super U,​? extends R> resultSelector
    • Constructor Detail

      • OperatorMapPair

        public OperatorMapPair​(Func1<? super T,​? extends Observable<? extends U>> collectionSelector,
                               Func2<? super T,​? super U,​? extends R> resultSelector)
    • Method Detail

      • convertSelector

        public static <T,​U> Func1<T,​Observable<U>> convertSelector​(Func1<? super T,​? extends java.lang.Iterable<? extends U>> selector)
        Creates the function that generates a Observable based on an item emitted by another Observable.
        Type Parameters:
        T - the input value type
        U - the value type of the generated Observable
        Parameters:
        selector - a function that accepts an item and returns an Iterable of corresponding items
        Returns:
        a function that converts an item emitted by the source Observable into an Observable that emits the items generated by selector operating on that item