Package rx.internal.operators
Class OperatorToMap<T,K,V>
java.lang.Object
rx.internal.operators.OperatorToMap<T,K,V>
- Type Parameters:
T
- the value type of the inputK
- the map-key typeV
- the map-value type
- All Implemented Interfaces:
Func1<Subscriber<? super Map<K,
,V>>, Subscriber<? super T>> Function
,Observable.Operator<Map<K,
V>, T>
Maps the elements of the source observable into a java.util.Map instance and
emits that once the source observable completes.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
The default map factory. -
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSubscriber
<? super T> call
(Subscriber<? super Map<K, V>> subscriber)
-
Field Details
-
keySelector
-
valueSelector
-
mapFactory
-
-
Constructor Details
-
OperatorToMap
public OperatorToMap(Func1<? super T, ? extends K> keySelector, Func1<? super T, ? extends V> valueSelector) ToMap with key selector, value selector and default HashMap factory.- Parameters:
keySelector
- the function extracting the map-key from the main valuevalueSelector
- the function extracting the map-value from the main value
-
OperatorToMap
public OperatorToMap(Func1<? super T, ? extends K> keySelector, Func1<? super T, ? extends V> valueSelector, Func0<? extends Map<K, V>> mapFactory) ToMap with key selector, value selector and custom Map factory.- Parameters:
keySelector
- the function extracting the map-key from the main valuevalueSelector
- the function extracting the map-value from the main valuemapFactory
- function that returns a Map instance to store keys and values into
-
-
Method Details