RxJava



rx.operators
Class OperationToMap.ToMap<T,K,V>

java.lang.Object
  extended by rx.operators.OperationToMap.ToMap<T,K,V>
Type Parameters:
T - the source's value type
K - the key type
V - the value type
All Implemented Interfaces:
Function, Observable.OnSubscribeFunc<java.util.Map<K,V>>
Enclosing class:
OperationToMap

public static class OperationToMap.ToMap<T,K,V>
extends java.lang.Object
implements Observable.OnSubscribeFunc<java.util.Map<K,V>>

Maps the elements of the source observable into a java.util.Map instance returned by the mapFactory function by using the keySelector and valueSelector.


Nested Class Summary
static class OperationToMap.ToMap.ToMapObserver<K,V,T>
          Observer that collects the source values of T into a map.
 
Constructor Summary
OperationToMap.ToMap(Observable<T> source, Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends java.util.Map<K,V>> mapFactory)
           
 
Method Summary
 Subscription onSubscribe(Observer<? super java.util.Map<K,V>> t1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationToMap.ToMap

public OperationToMap.ToMap(Observable<T> source,
                            Func1<? super T,? extends K> keySelector,
                            Func1<? super T,? extends V> valueSelector,
                            Func0<? extends java.util.Map<K,V>> mapFactory)
Method Detail

onSubscribe

public Subscription onSubscribe(Observer<? super java.util.Map<K,V>> t1)
Specified by:
onSubscribe in interface Observable.OnSubscribeFunc<java.util.Map<K,V>>