Class AbstractListValuedMap<K,​V>

    • Method Detail

      • get

        public java.util.List<V> get​(K key)
        Gets the list of values associated with the specified key. This would return an empty list in case the mapping is not present
        Specified by:
        get in interface ListValuedMap<K,​V>
        Specified by:
        get in interface MultiValuedMap<K,​V>
        Overrides:
        get in class AbstractMultiValuedMap<K,​V>
        Parameters:
        key - the key to retrieve
        Returns:
        the List of values, will return an empty List for no mapping
      • remove

        public java.util.List<V> remove​(java.lang.Object key)
        Removes all values associated with the specified key.

        A subsequent get(Object) would return an empty list.

        Specified by:
        remove in interface ListValuedMap<K,​V>
        Specified by:
        remove in interface MultiValuedMap<K,​V>
        Overrides:
        remove in class AbstractMultiValuedMap<K,​V>
        Parameters:
        key - the key to remove values from
        Returns:
        the List of values removed, will return an empty, unmodifiable list for no mapping found.