Class DelegatingMultimap<K,​V>

    • Constructor Detail

      • DelegatingMultimap

        public DelegatingMultimap​(Map<K,​Collection<V>> map)
    • Method Detail

      • createValueCollection

        protected Collection<V> createValueCollection()
      • put

        public void put​(K key,
                        V value)
        Description copied from interface: Multimap
        Put the element pair.
        Specified by:
        put in interface Multimap<K,​V>
        Parameters:
        key - key
        value - value
      • putAll

        public void putAll​(K key,
                           Collection<V> vvs)
        Description copied from interface: Multimap
        Put multiple pairs.
        Specified by:
        putAll in interface Multimap<K,​V>
        Parameters:
        key - key
        vvs - values
      • get

        public Collection<V> get​(K key)
        Description copied from interface: Multimap
        Get all values associated with the key
        Specified by:
        get in interface Multimap<K,​V>
        Parameters:
        key - key
        Returns:
        collection of values
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: Multimap
        Checks if multimap is empty
        Specified by:
        isEmpty in interface Multimap<K,​V>
        Returns:
        true, if empty
      • clear

        public void clear()
        Description copied from interface: Multimap
        Clears the multimap
        Specified by:
        clear in interface Multimap<K,​V>
      • keys

        public Collection<K> keys()
        Description copied from interface: Multimap
        Keys in the map
        Specified by:
        keys in interface Multimap<K,​V>
        Returns:
        collection of keys
      • entrySet

        public Collection<Map.Entry<K,​Collection<V>>> entrySet()
        Description copied from interface: Multimap
        Get all associations of the multimap. The method is intended for read-only view.
        Specified by:
        entrySet in interface Multimap<K,​V>
        Returns:
        entry set of the multimap
      • remove

        public void remove​(K key)
        Specified by:
        remove in interface Multimap<K,​V>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object