Interface RListMultimapRx<K,​V>

  • Type Parameters:
    K - key type
    V - value type
    All Superinterfaces:
    RExpirableRx, RMultimapRx<K,​V>, RObjectRx

    public interface RListMultimapRx<K,​V>
    extends RMultimapRx<K,​V>
    RxJava2 interface for List based Multimap object
    Author:
    Nikita Koksharov
    • Method Detail

      • get

        RListRx<V> get​(K key)
        Returns a view List of the values associated with key in this multimap, if any. Note that when containsKey(key) is false, this returns an empty collection, not null.

        Changes to the returned collection will update the underlying multimap, and vice versa.

        Parameters:
        key - - map key
        Returns:
        list of values
      • getAll

        io.reactivex.Flowable<List<V>> getAll​(K key)
        Returns all elements at once. Result Set is NOT backed by map, so changes are not reflected in map.
        Parameters:
        key - - map key
        Returns:
        list of values
      • removeAll

        io.reactivex.Flowable<List<V>> removeAll​(Object key)
        Removes all values associated with the key key.

        Once this method returns, key will not be mapped to any values

        Use RMultimapReactive.fastRemove(K...) if values are not needed.

        Parameters:
        key - - map key
        Returns:
        the values that were removed (possibly empty). The returned list may be modifiable, but updating it will have no effect on the multimap.
      • replaceValues

        io.reactivex.Flowable<List<V>> replaceValues​(K key,
                                                     Iterable<? extends V> values)
        Stores a collection of values with the same key, replacing any existing values for that key.

        If values is empty, this is equivalent to removeAll(Object).

        Parameters:
        key - - map key
        values - - map values
        Returns:
        list of replaced values, or an empty collection if no values were previously associated with the key. List may be modifiable, but updating it will have no effect on the multimap.