MultiValuedMap interface to simplify
the creation of subclass implementations.
Subclasses specify a Map implementation to use as the internal storage.
| Modifier and Type | Class and Description |
|---|---|
| private class | AbstractMultiValuedMap.AsMap
Inner class that provides the AsMap view. |
| private class | AbstractMultiValuedMap.EntryValues
Inner class that provides the Entry<k, v> view |
| private class | AbstractMultiValuedMap.KeysMultiSet
Inner class that provides a MultiSet<k> keys view. |
| private class | AbstractMultiValuedMap.MultiValuedMapEntry
Inner class for MultiValuedMap Entries. |
| private class | AbstractMultiValuedMap.MultiValuedMapIterator
Inner class for MapIterator. |
| private class | AbstractMultiValuedMap.Values
Inner class that provides the values view. |
| private class | AbstractMultiValuedMap.ValuesIterator
Inner class that provides the values iterator. |
| pack-priv class | AbstractMultiValuedMap.WrappedCollection
Wrapped collection to handle add and remove on the collection returned by get(object). |
| Modifier and Type | Field and Description |
|---|---|
| private transient AbstractMultiValuedMap | asMapView
The AsMap view |
| private transient AbstractMultiValuedMap | entryValuesView
The EntryValues view |
| private transient MultiSet | keysMultiSetView
The KeyMultiSet view |
| private transient Map | map
The map used to store the data |
| private transient Collection | valuesView
The values view |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | AbstractMultiValuedMap(final Map<K, ? extends Collection<V>>
the map to wrap, must not be null map)Constructor that wraps (not copies). |
| Modifier and Type | Method and Description |
|---|---|
| public Map | asMap()
Implements org. Map from each distinct
key to the non-empty collection of that key's associated values.
|
| public void | clear()
Implements org. |
| public boolean | containsKey(final Object
key whose presence in this map is to be tested key)Implements org. true if this map contains a mapping for the specified
key.
|
| public boolean | containsMapping(final Object
the key to search for key, final Object the value to search for value)Implements org. |
| public boolean | containsValue(final Object
the value to search for value)Implements org. |
| protected abstract Collection | |
| protected void | |
| protected void | doWriteObject(final ObjectOutputStream
the output stream out)Write the map out using a custom routine. |
| public Collection | entries()
Implements org. Collection view of the mappings contained in this multi-valued map.
|
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. |
| public Collection | Returns: theCollection of values, will return an empty Collection for no mappingthe key to retrieve key)Implements org. |
| protected Map | |
| public int | |
| public boolean | isEmpty()
Implements org. true if this map contains no key-value mappings.
|
| public MultiSet | Returns: a bag view of the key mapping contained in this mapImplements org. MultiSet view of the key mapping contained in this map.
|
| public Set | keySet()
Implements org. Set view of the keys contained in this multi-valued map.
|
| public MapIterator | mapIterator()
Implements org. MapIterator over this multi-valued map.
|
| public boolean | Returns: the value added if the map changed and null if the map did not changethe key to store against key, final V the value to add to the collection at the key value)Implements org. |
| public boolean | Returns: true if the map changed as a result of this operationmappings to be stored in this map, may not be null map)Implements org. |
| public boolean | Returns: true if the map changed as a result of this operationmappings to be stored in this map, may not be null map)Implements org. |
| public boolean | Returns: true if this map changedthe key to store against key, final Iterable<? extends V> the values to add to the collection at the key, may not be null values)Implements org. |
| public Collection | Returns: theCollection of values removed, will return an
empty, unmodifiable collection for no mapping foundthe key to remove values from key)Implements org. |
| public boolean | Returns: true if the mapping was removed, false otherwisethe key to remove from key, final Object the value to remove value)Implements org. |
| protected void | |
| public int | size()
Implements org. |
| public String | |
| public Collection | Returns: a collection view of the values contained in this mapImplements org. |
| pack-priv Collection |