T
- the value type of the inputK
- the multimap-key typeV
- the multimap-value typepublic final class OnSubscribeToMultimap<T,K,V> extends Object implements Observable.OnSubscribe<Map<K,Collection<V>>>, Func0<Map<K,Collection<V>>>
Constructor and Description |
---|
OnSubscribeToMultimap(Observable<T> source,
Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector)
ToMultimap with key selector, custom value selector,
default HashMap factory and default ArrayList collection factory.
|
OnSubscribeToMultimap(Observable<T> source,
Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
Func0<? extends Map<K,Collection<V>>> mapFactory)
ToMultimap with key selector, custom value selector,
custom Map factory and default ArrayList collection factory.
|
OnSubscribeToMultimap(Observable<T> source,
Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
Func0<? extends Map<K,Collection<V>>> mapFactory,
Func1<? super K,? extends Collection<V>> collectionFactory)
ToMultimap with key selector, custom value selector,
custom Map factory and custom collection factory.
|
Modifier and Type | Method and Description |
---|---|
Map<K,Collection<V>> |
call() |
void |
call(Subscriber<? super Map<K,Collection<V>>> subscriber) |
public OnSubscribeToMultimap(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 OnSubscribeToMultimap(Observable<T> source, Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends Map<K,Collection<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 intopublic OnSubscribeToMultimap(Observable<T> source, Func1<? super T,? extends K> keySelector, Func1<? super T,? extends V> valueSelector, Func0<? extends Map<K,Collection<V>>> mapFactory, Func1<? super K,? extends Collection<V>> collectionFactory)
source
- the observable sourcekeySelector
- 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 intocollectionFactory
- function that returns a Collection for a particular key to store values intopublic Map<K,Collection<V>> call()
public void call(Subscriber<? super Map<K,Collection<V>>> subscriber)
call
in interface Action1<Subscriber<? super Map<K,Collection<V>>>>
Copyright © 2017. All rights reserved.