Multimap implementation, not necessarily in terms of a Map.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | |
| pack-priv class | |
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private transient Map | |
| private transient Collection | |
| private transient Multiset | |
| private transient Set | |
| private transient Collection |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| 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 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 | containsValue(Object value)
Implements com. true if this multimap contains at least one key-value pair with the value
value.
|
| pack-priv abstract Map | |
| pack-priv abstract Collection | |
| pack-priv abstract Multiset | |
| pack-priv abstract Set | |
| pack-priv abstract Collection | |
| public Collection | entries()
Implements com. Entry
instances.
|
| pack-priv abstract Iterator | |
| pack-priv Spliterator | |
| public boolean | equals(Object
the reference object with which to compare. object)Overrides java. Implements com. |
| 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 | replaceValues(K key, Iterable<? extends V> values)
Implements com. |
| public String | Returns: a string representation of the multimapOverrides java. toString on the
map returned by Multimap#asMap.
|
| pack-priv Iterator | |
| public Collection | values()
Implements com. values().size() == size()).
|
| pack-priv Spliterator |
| asMap | back to summary |
|---|---|
| private transient Map<K, Collection<V>> asMap
| |
| entries | back to summary |
|---|---|
| private transient Collection<Map. | |
| keys | back to summary |
|---|---|
| private transient Multiset<K> keys
| |
| keySet | back to summary |
|---|---|
| private transient Set<K> keySet
| |
| values | back to summary |
|---|---|
| private transient Collection<V> values
| |
| AbstractMultimap | back to summary |
|---|---|
| pack-priv AbstractMultimap() | |
| 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
| |
| containsEntry | back to summary |
|---|---|
| public boolean containsEntry(Object key, Object value) Implements com. Doc from com. Returns
| |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements com. Doc from com. Returns
| |
| createAsMap | back to summary |
|---|---|
| pack-priv abstract Map | |
| createEntries | back to summary |
|---|---|
| pack-priv abstract Collection | |
| createKeys | back to summary |
|---|---|
| pack-priv abstract Multiset | |
| createKeySet | back to summary |
|---|---|
| pack-priv abstract Set | |
| createValues | back to summary |
|---|---|
| pack-priv abstract Collection | |
| 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.
| |
| entryIterator | back to summary |
|---|---|
| pack-priv abstract Iterator | |
| entrySpliterator | back to summary |
|---|---|
| pack-priv Spliterator | |
| 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
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements 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
| |
| 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
| |
| 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
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of the multimap, generated by calling | |
| valueIterator | back to summary |
|---|---|
| pack-priv Iterator | |
| 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.
| |
| valueSpliterator | back to summary |
|---|---|
| pack-priv Spliterator | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Iterator | iterator()
Implements abstract java. Implements java. |
| pack-priv Multimap | |
| public Spliterator | spliterator()
Overrides default java. Spliterator over the elements in this collection.
|
| Entries | back to summary |
|---|---|
| pack-priv Entries() | |
| iterator | back to summary |
|---|---|
| public Iterator Implements abstract java. Implements java. Doc from java. Returns an iterator over the elements contained in this collection. | |
| multimap | back to summary |
|---|---|
| pack-priv Multimap Implements abstract com.
| |
| spliterator | back to summary |
|---|---|
| public Spliterator Overrides default java. Doc from java. Creates a The default implementation should be overridden by subclasses that
can return a more efficient spliterator. In order to
preserve expected laziness behavior for the
These requirements ensure that streams produced by the
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
object to be compared for equality with this set obj)Overrides java. Implements java. |
| public int | hashCode()
Overrides java. Implements java. |
| EntrySet | back to summary |
|---|---|
| pack-priv EntrySet() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Implements java. Doc from java. Compares the specified object with this set for equality. Returns
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Doc from java. Returns the hash code value for this set. The hash code of a set is
defined to be the sum of the hash codes of the elements in the set,
where the hash code of a
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Overrides java. Implements java. |
| public boolean | contains(Object
element whose presence in this collection is to be tested o)Overrides java. Implements java. true if this collection contains the specified element.
|
| public Iterator | iterator()
Implements abstract java. Implements java. |
| public int | size()
Implements abstract java. Implements java. |
| public Spliterator | spliterator()
Overrides default java. Spliterator over the elements in this collection.
|
| Values | back to summary |
|---|---|
| pack-priv Values() | |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Doc from java. Removes all of the elements from this collection (optional operation). The collection will be empty after this method returns.
| |
| contains | back to summary |
|---|---|
| public boolean contains(Object o) Overrides java. Implements java. Doc from java. Returns
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements abstract java. Implements java. Doc from java. Returns an iterator over the elements contained in this collection. | |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this collection. If this collection
contains more than
| |
| spliterator | back to summary |
|---|---|
| public Spliterator Overrides default java. Doc from java. Creates a The default implementation should be overridden by subclasses that
can return a more efficient spliterator. In order to
preserve expected laziness behavior for the
These requirements ensure that streams produced by the
| |