K
- class of the keys of this mapV
- class of the map values. Note that the action map value type is Listpublic class MultiValueMap<K,V>
extends java.util.HashMap<K,java.util.List<V>>
Constructor and Description |
---|
MultiValueMap()
Default Constructor.
|
MultiValueMap(int size)
Conversion Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
add(K key,
V value)
add another value to the given key.
|
void |
addKey(K key)
set an empty value list. for the given key.
|
java.util.List<V> |
getValues(K key) |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
public MultiValueMap()
public MultiValueMap(int size)
size
- the initial size of this mappublic java.util.List<V> getValues(K key)
key
- a keypublic java.lang.Object add(K key, V value)
key
- keyvalue
- a new valuepublic void addKey(K key)
key
- the key