toSetMultimap<K, V> method

Observable<SetMultimap<K, V>> toSetMultimap<K, V>({
  1. Map0<SetMultimap<K, V>>? constructor,
  2. Map1<T, K>? keySelector,
  3. Map1<T, V>? valueSelector,
})

Returns a SetMultimap from an observable sequence.

Implementation

Observable<SetMultimap<K, V>> toSetMultimap<K, V>(
        {Map0<SetMultimap<K, V>>? constructor,
        Map1<T, K>? keySelector,
        Map1<T, V>? valueSelector}) =>
    ToMapObservable<T, SetMultimap<K, V>, K, V>(
        this,
        constructor ?? () => SetMultimap<K, V>(),
        keySelector ?? (value) => value as K,
        valueSelector ?? (value) => value as V,
        (map, key, value) => map.add(key, value));