ListValuedMap, using a HashMap to provide data
storage and ArrayLists as value collections. This is the standard
implementation of a ListValuedMap.
Note that ArrayListValuedHashMap is not synchronized and is not thread-safe. If you wish to use this map from multiple threads concurrently, you must use appropriate synchronization. This class may throw exceptions when accessed by concurrent threads without synchronization.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | DEFAULT_INITIAL_LIST_CAPACITY
The initial list capacity when using none specified in constructor. |
| private static final int | DEFAULT_INITIAL_MAP_CAPACITY
The initial map capacity used when none specified in constructor. |
| private final int | initialListCapacity
The initial list capacity when creating a new value collection. |
| private static final long | serialVersionUID
Serialization Version |
| Access | Constructor and Description |
|---|---|
| public | ArrayListValuedHashMap()
Creates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the default initial list capacity (3). |
| public | ArrayListValuedHashMap(final int
the initial capacity used for value collections initialListCapacity)Creates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the specified initial list capacity. |
| public | ArrayListValuedHashMap(final int
the initial hashmap capacity initialMapCapacity, final int the initial capacity used for value collections initialListCapacity)Creates an empty ArrayListValuedHashMap with the specified initial map and list capacities. |
| public | ArrayListValuedHashMap(final MultiValuedMap<? extends K, ? extends V>
a map)MultiValuedMap to copy into this mapCreates an ArrayListValuedHashMap copying all the mappings of the given map. |
| public | ArrayListValuedHashMap(final Map<? extends K, ? extends V>
a map)Map to copy into this mapCreates an ArrayListValuedHashMap copying all the mappings of the given map. |
| Modifier and Type | Method and Description |
|---|---|
| protected ArrayList | createCollection()
Implements abstract org. |
| private void | |
| public void | |
| private void |
| DEFAULT_INITIAL_LIST_CAPACITY | back to summary |
|---|---|
| private static final int DEFAULT_INITIAL_LIST_CAPACITY The initial list capacity when using none specified in constructor. | |
| DEFAULT_INITIAL_MAP_CAPACITY | back to summary |
|---|---|
| private static final int DEFAULT_INITIAL_MAP_CAPACITY The initial map capacity used when none specified in constructor. | |
| initialListCapacity | back to summary |
|---|---|
| private final int initialListCapacity The initial list capacity when creating a new value collection. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serialization Version | |
| ArrayListValuedHashMap | back to summary |
|---|---|
| public ArrayListValuedHashMap() Creates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the default initial list capacity (3). | |
| ArrayListValuedHashMap | back to summary |
|---|---|
| public ArrayListValuedHashMap(final int initialListCapacity) Creates an empty ArrayListValuedHashMap with the default initial map capacity (16) and the specified initial list capacity.
| |
| ArrayListValuedHashMap | back to summary |
|---|---|
| public ArrayListValuedHashMap(final int initialMapCapacity, final int initialListCapacity) Creates an empty ArrayListValuedHashMap with the specified initial map and list capacities.
| |
| ArrayListValuedHashMap | back to summary |
|---|---|
| public ArrayListValuedHashMap(final MultiValuedMap<? extends K, ? extends V> map) Creates an ArrayListValuedHashMap copying all the mappings of the given map.
| |
| ArrayListValuedHashMap | back to summary |
|---|---|
| public ArrayListValuedHashMap(final Map<? extends K, ? extends V> map) Creates an ArrayListValuedHashMap copying all the mappings of the given map.
| |
| createCollection | back to summary |
|---|---|
| protected ArrayList Implements abstract org. Doc from org. Creates a new value collection using the provided factory. | |
| readObject | back to summary |
|---|---|
| private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException | |
| trimToSize | back to summary |
|---|---|
| public void trimToSize() Trims the capacity of all value collections to their current size. | |
| writeObject | back to summary |
|---|---|
| private void writeObject(final ObjectOutputStream oos) throws IOException | |