All Implemented Interfaces:
Multimap<K,V>, SetMultimap<K,V>, Serializable

  • Method Summary

    asMap()

    Returns a view of this multimap as a Map from each distinct key to the nonempty collection of that key's associated values.

    void

    clear()

    Removes all key-value pairs from the multimap, leaving it empty.

    boolean

    Returns true if this multimap contains at least one key-value pair with the key key and the value value.

    boolean

    Returns true if this multimap contains at least one key-value pair with the key key.

    boolean

    Returns true if this multimap contains at least one key-value pair with the value value.

    create()

    Creates a new, empty HashMultimap with the default initial capacities.

    create(int expectedKeys, int expectedValuesPerKey)

    Constructs an empty HashMultimap with enough capacity to hold the specified numbers of keys and values without rehashing.

    create(Multimap<? extends K, ? extends V> multimap)

    Constructs a HashMultimap with the same mappings as the specified multimap.

    entries()

    Returns a view collection of all key-value pairs contained in this multimap, as Map.Entry instances.

    boolean

    Compares the specified object to this multimap for equality.

    void

    Performs the given action for all key-value pairs contained in this multimap.

    get(K key)

    Returns a view collection of the values associated with key in this multimap, if any.

    int

    hashCode()

    Returns the hash code for this multimap.

    boolean

    isEmpty()

    Returns true if this multimap contains no key-value pairs.

    keys()

    Returns a view collection containing the key from each key-value pair in this multimap, without collapsing duplicates.

    keySet()

    Returns a view collection of all distinct keys contained in this multimap.

    boolean

    put(K key, V value)

    Stores a key-value pair in the multimap.

    boolean

    putAll(Multimap<? extends K, ? extends V> multimap)

    Stores all key-value pairs of multimap in this multimap, in the order returned by multimap.entries().

    boolean

    putAll(K key, Iterable<? extends V> values)

    Stores a key-value pair in this multimap for each of values, all using the same key, key.

    boolean

    Removes a single key-value pair with the key key and the value value from this multimap, if such exists.

    Removes all values associated with the key key.

    Stores a collection of values with the same key, replacing any existing values for that key.

    int

    size()

    Returns the number of key-value pairs in this multimap.

    toString()

    Returns a string representation of the multimap, generated by calling toString on the map returned by Multimap.asMap().

    values()

    Returns a view collection containing the value from each key-value pair contained in this multimap, without collapsing duplicates (so values().size() == size()).

  • Method Details

    • create

    • create

    • create

    • get

    • entries

    • removeAll

    • replaceValues

    • asMap

    • put

    • equals

    • size

    • containsKey

    • clear

    • values

    • forEach

    • isEmpty

    • containsValue

    • containsEntry

    • remove

    • putAll

    • putAll

    • keySet

    • keys

    • hashCode

    • toString