SetValuedMap, using a HashMap to provide data
storage and HashSets as value collections. This is the standard
implementation of a SetValuedMap.
Note that HashSetValuedHashMap 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_MAP_CAPACITY
The initial map capacity used when none specified in constructor. |
| private static final int | DEFAULT_INITIAL_SET_CAPACITY
The initial set capacity when using none specified in constructor. |
| private final int | initialSetCapacity
The initial list capacity when creating a new value collection. |
| private static final long | serialVersionUID
Serialization Version |
| Access | Constructor and Description |
|---|---|
| public | HashSetValuedHashMap()
Creates an empty HashSetValuedHashMap with the default initial map capacity (16) and the default initial set capacity (3). |
| public | HashSetValuedHashMap(final int
the initial capacity used for value collections initialSetCapacity)Creates an empty HashSetValuedHashMap with the default initial map capacity (16) and the specified initial set capacity. |
| public | HashSetValuedHashMap(final int
the initial hashmap capacity initialMapCapacity, final int the initial capacity used for value collections initialSetCapacity)Creates an empty HashSetValuedHashMap with the specified initial map and list capacities. |
| public | HashSetValuedHashMap(final MultiValuedMap<? extends K, ? extends V>
a map)MultiValuedMap to copy into this mapCreates an HashSetValuedHashMap copying all the mappings of the given map. |
| public | HashSetValuedHashMap(final Map<? extends K, ? extends V>
a map)Map to copy into this mapCreates an HashSetValuedHashMap copying all the mappings of the given map. |
| Modifier and Type | Method and Description |
|---|---|
| protected HashSet | createCollection()
Implements abstract org. |
| private void | |
| private void |
| 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. | |
| DEFAULT_INITIAL_SET_CAPACITY | back to summary |
|---|---|
| private static final int DEFAULT_INITIAL_SET_CAPACITY The initial set capacity when using none specified in constructor. | |
| initialSetCapacity | back to summary |
|---|---|
| private final int initialSetCapacity The initial list capacity when creating a new value collection. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serialization Version | |
| HashSetValuedHashMap | back to summary |
|---|---|
| public HashSetValuedHashMap() Creates an empty HashSetValuedHashMap with the default initial map capacity (16) and the default initial set capacity (3). | |
| HashSetValuedHashMap | back to summary |
|---|---|
| public HashSetValuedHashMap(final int initialSetCapacity) Creates an empty HashSetValuedHashMap with the default initial map capacity (16) and the specified initial set capacity.
| |
| HashSetValuedHashMap | back to summary |
|---|---|
| public HashSetValuedHashMap(final int initialMapCapacity, final int initialSetCapacity) Creates an empty HashSetValuedHashMap with the specified initial map and list capacities.
| |
| HashSetValuedHashMap | back to summary |
|---|---|
| public HashSetValuedHashMap(final MultiValuedMap<? extends K, ? extends V> map) Creates an HashSetValuedHashMap copying all the mappings of the given map.
| |
| HashSetValuedHashMap | back to summary |
|---|---|
| public HashSetValuedHashMap(final Map<? extends K, ? extends V> map) Creates an HashSetValuedHashMap copying all the mappings of the given map.
| |
| createCollection | back to summary |
|---|---|
| protected HashSet 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 | |
| writeObject | back to summary |
|---|---|
| private void writeObject(final ObjectOutputStream oos) throws IOException | |