default method warning: This class does not forward calls to default methods. Instead, it inherits their default implementations. When those implementations
invoke methods, they invoke methods on the ForwardingMultimap.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Map | asMap()
Implements com. Map from each distinct key to the nonempty
collection of that key's associated values.
|
| public void | clear()
Implements com. |
| public boolean | containsEntry(Object key, Object value)
Implements com. true if this multimap contains at least one key-value pair with the key key and the value value.
|
| public boolean | containsKey(Object key)
Implements com. true if this multimap contains at least one key-value pair with the key key.
|
| public boolean | containsValue(Object value)
Implements com. true if this multimap contains at least one key-value pair with the value
value.
|
| protected abstract Multimap | delegate()
Implements abstract com. |
| public Collection | entries()
Implements com. Entry
instances.
|
| public boolean | equals(Object
the reference object with which to compare. object)Overrides java. Implements com. |
| public Collection | get(K key)
Implements com. key in this multimap, if any.
|
| public int | hashCode()
Overrides java. Implements com. |
| public boolean | isEmpty()
Implements com. true if this multimap contains no key-value pairs.
|
| public Multiset | keys()
Implements com. |
| public Set | keySet()
Implements com. |
| public boolean | put(K key, V value)
Implements com. |
| public boolean | putAll(K key, Iterable<? extends V> values)
Implements com. values, all using the same key,
key.
|
| public boolean | putAll(Multimap<? extends K, ? extends V> multimap)
Implements com. multimap in this multimap, in the order returned by
multimap.entries().
|
| public boolean | remove(Object key, Object value)
Implements com. key and the value value from this
multimap, if such exists.
|
| public Collection | removeAll(Object key)
Implements com. key.
|
| public Collection | replaceValues(K key, Iterable<? extends V> values)
Implements com. |
| public int | size()
Implements com. |
| public Collection | values()
Implements com. values().size() == size()).
|
| ForwardingMultimap | back to summary |
|---|---|
| protected ForwardingMultimap() Constructor for use by subclasses. | |
| asMap | back to summary |
|---|---|
| public Map Implements com. Doc from com. Returns a view of this multimap as a Changes to the returned map or the collections that serve as its values will update the
underlying multimap, and vice versa. The map does not support
| |
| clear | back to summary |
|---|---|
| public void clear() Implements com. Doc from com. Removes all key-value pairs from the multimap, leaving it empty.
| |
| containsEntry | back to summary |
|---|---|
| public boolean containsEntry(Object key, Object value) Implements com. Doc from com. Returns
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Implements com. Doc from com. Returns
| |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements com. Doc from com. Returns
| |
| delegate | back to summary |
|---|---|
| protected abstract Multimap Implements abstract com. Doc from com. Returns the backing delegate instance that methods are forwarded to. Abstract subclasses
generally override this method with an abstract method that has a more specific return type,
such as
| |
| entries | back to summary |
|---|---|
| public Collection Implements com. Doc from com. Returns a view collection of all key-value pairs contained in this multimap, as Changes to the returned collection or the entries it contains will update the underlying multimap, and vice versa. However, adding to the returned collection is not possible.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Implements com. Doc from com. Compares the specified object with this multimap for equality. Two multimaps are equal when
their map views, as returned by In general, two multimaps with identical key-value mappings may or may not be equal,
depending on the implementation. For example, two A non-empty
| |
| get | back to summary |
|---|---|
| public Collection Implements com. Doc from com. Returns a view collection of the values associated with Changes to the returned collection will update the underlying multimap, and vice versa.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements com. Doc from com. Returns the hash code for this multimap. The hash code of a multimap is defined as the hash code of the map view, as returned by
In general, two multimaps with identical key-value mappings may or may not have the same
hash codes, depending on the implementation. For example, two
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements com. Doc from com. Returns
| |
| keys | back to summary |
|---|---|
| public Multiset Implements com. Doc from com. Returns a view collection containing the key from each key-value pair in this multimap,
without collapsing duplicates. This collection has the same size as this multimap, and
Changes to the returned multiset will update the underlying multimap, and vice versa. However, adding to the returned collection is not possible.
| |
| keySet | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a view collection of all distinct keys contained in this multimap. Note that the key set contains a key if and only if this multimap maps that key to at least one value. Changes to the returned set will update the underlying multimap, and vice versa. However, adding to the returned set is not possible.
| |
| put | back to summary |
|---|---|
| public boolean put(K key, V value) Implements com. Doc from com. Stores a key-value pair in this multimap. Some multimap implementations allow duplicate key-value pairs, in which case
| |
| putAll | back to summary |
|---|---|
| public boolean putAll(K key, Iterable<? extends V> values) Implements com. Doc from com. Stores a key-value pair in this multimap for each of
In particular, this is a no-op if
| |
| putAll | back to summary |
|---|---|
| public boolean putAll(Multimap<? extends K, ? extends V> multimap) Implements com. Doc from com. Stores all key-value pairs of
| |
| remove | back to summary |
|---|---|
| public boolean remove(Object key, Object value) Implements com. Doc from com. Removes a single key-value pair with the key
| |
| removeAll | back to summary |
|---|---|
| public Collection Implements com. Doc from com. Removes all values associated with the key Once this method returns,
| |
| replaceValues | back to summary |
|---|---|
| public Collection Implements com. Doc from com. Stores a collection of values with the same key, replacing any existing values for that key. If
| |
| size | back to summary |
|---|---|
| public int size() Implements com. Doc from com. Returns the number of key-value pairs in this multimap. Note this method does not return the number of distinct keys in the multimap,
which is given by
| |
| values | back to summary |
|---|---|
| public Collection Implements com. Doc from com. Returns a view collection containing the value from each key-value pair contained in
this multimap, without collapsing duplicates (so Changes to the returned collection will update the underlying multimap, and vice versa. However, adding to the returned collection is not possible.
| |