T
- the value type of the inputK
- the map-key typeV
- the map-value typepublic final class OnSubscribeToMap<T,K,V> extends Object implements Observable.OnSubscribe<Map<K,V>>, Func0<Map<K,V>>
Constructor and Description |
---|
OnSubscribeToMap(Observable<T> source,
Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector)
ToMap with key selector, value selector and default HashMap factory.
|
OnSubscribeToMap(Observable<T> source,
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.
|
Modifier and Type | Method and Description |
---|---|
Map<K,V> |
call() |
void |
call(Subscriber<? super Map<K,V>> subscriber) |
public OnSubscribeToMap(Observable<T> source, Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector)
source
- the source Observable instancekeySelector
- the function extracting the map-key from the main valuevalueSelector
- the function extracting the map-value from the main valuepublic OnSubscribeToMap(Observable<T> source, Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends Map<K,V>> mapFactory)
source
- the source Observable instancekeySelector
- 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 intoCopyright © 2018. All rights reserved.