Interface BaseMultiMap<K,​V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Collection<V> get​(K key)
      Returns the collection of values associated with the key.
      boolean put​(K key, V value)
      Stores a key-value pair in the multimap.
      java.util.Collection<V> remove​(java.lang.Object key)
      Removes all the entries associated with the given key.
      boolean remove​(java.lang.Object key, java.lang.Object value)
      Removes the given key value pair from the multimap.
      int size()
      Returns the number of key-value pairs in the multimap.
      int valueCount​(K key)
      Returns the number of values matching the given key in the multimap.
    • Method Detail

      • put

        boolean put​(K key,
                    V value)
        Stores a key-value pair in the multimap.
        Parameters:
        key - the key to be stored
        value - the value to be stored
        Returns:
        true if the size of the multimap is increased, false if the multimap already contains the key-value pair.
      • get

        java.util.Collection<V> get​(K key)
        Returns the collection of values associated with the key.
        Parameters:
        key - the key whose associated values are returned
        Returns:
        the collection of the values associated with the key
      • remove

        boolean remove​(java.lang.Object key,
                       java.lang.Object value)
        Removes the given key value pair from the multimap.
        Parameters:
        key - the key of the entry to remove
        value - the value of the entry to remove
        Returns:
        true if the size of the multimap changed after the remove operation, false otherwise.
      • remove

        java.util.Collection<V> remove​(java.lang.Object key)
        Removes all the entries associated with the given key.
        Parameters:
        key - the key of the entries to remove
        Returns:
        the collection of removed values associated with the given key. The returned collection might be modifiable but it has no effect on the multimap.
      • valueCount

        int valueCount​(K key)
        Returns the number of values matching the given key in the multimap.
        Parameters:
        key - the key whose number of values is to be returned
        Returns:
        the number of values matching the given key in the multimap
      • size

        int size()
        Returns the number of key-value pairs in the multimap.
        Returns:
        the number of key-value pairs in the multimap