|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.util.CollectionUtils.MultiValueMapAdapter<K,V>
private static class CollectionUtils.MultiValueMapAdapter<K,V>
Adapts a Map to the MultiValueMap contract.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
private java.util.Map<K,java.util.List<V>> |
map
|
Constructor Summary | |
---|---|
CollectionUtils.MultiValueMapAdapter(java.util.Map<K,java.util.List<V>> map)
|
Method Summary | |
---|---|
void |
add(K key,
V value)
Add the given single value to the current list of values for the given key. |
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set<java.util.Map.Entry<K,java.util.List<V>>> |
entrySet()
|
boolean |
equals(java.lang.Object other)
|
java.util.List<V> |
get(java.lang.Object key)
|
V |
getFirst(K key)
Return the first value for the given key. |
int |
hashCode()
|
boolean |
isEmpty()
|
java.util.Set<K> |
keySet()
|
java.util.List<V> |
put(K key,
java.util.List<V> value)
|
void |
putAll(java.util.Map<? extends K,? extends java.util.List<V>> m)
|
java.util.List<V> |
remove(java.lang.Object key)
|
void |
set(K key,
V value)
Set the given single value under the given key. |
void |
setAll(java.util.Map<K,V> values)
Set the given values under. |
int |
size()
|
java.util.Map<K,V> |
toSingleValueMap()
Returns the first values contained in this MultiValueMap . |
java.lang.String |
toString()
|
java.util.Collection<java.util.List<V>> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final java.util.Map<K,java.util.List<V>> map
Constructor Detail |
---|
public CollectionUtils.MultiValueMapAdapter(java.util.Map<K,java.util.List<V>> map)
Method Detail |
---|
public void add(K key, V value)
MultiValueMap
add
in interface MultiValueMap<K,V>
key
- the keyvalue
- the value to be addedpublic V getFirst(K key)
MultiValueMap
getFirst
in interface MultiValueMap<K,V>
key
- the key
null
public void set(K key, V value)
MultiValueMap
set
in interface MultiValueMap<K,V>
key
- the keyvalue
- the value to setpublic void setAll(java.util.Map<K,V> values)
MultiValueMap
setAll
in interface MultiValueMap<K,V>
values
- the values.public java.util.Map<K,V> toSingleValueMap()
MultiValueMap
MultiValueMap
.
toSingleValueMap
in interface MultiValueMap<K,V>
public int size()
size
in interface java.util.Map<K,java.util.List<V>>
public boolean isEmpty()
isEmpty
in interface java.util.Map<K,java.util.List<V>>
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<K,java.util.List<V>>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<K,java.util.List<V>>
public java.util.List<V> get(java.lang.Object key)
get
in interface java.util.Map<K,java.util.List<V>>
public java.util.List<V> put(K key, java.util.List<V> value)
put
in interface java.util.Map<K,java.util.List<V>>
public java.util.List<V> remove(java.lang.Object key)
remove
in interface java.util.Map<K,java.util.List<V>>
public void putAll(java.util.Map<? extends K,? extends java.util.List<V>> m)
putAll
in interface java.util.Map<K,java.util.List<V>>
public void clear()
clear
in interface java.util.Map<K,java.util.List<V>>
public java.util.Set<K> keySet()
keySet
in interface java.util.Map<K,java.util.List<V>>
public java.util.Collection<java.util.List<V>> values()
values
in interface java.util.Map<K,java.util.List<V>>
public java.util.Set<java.util.Map.Entry<K,java.util.List<V>>> entrySet()
entrySet
in interface java.util.Map<K,java.util.List<V>>
public boolean equals(java.lang.Object other)
equals
in interface java.util.Map<K,java.util.List<V>>
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Map<K,java.util.List<V>>
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |