|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.util.MultiMap<K>
K
- The key type of the map.public class MultiMap<K>
A multi valued Map. This Map specializes HashMap and provides methods that operate on multi valued items.
Implemented as a map of LazyList values
LazyList
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
MultiMap()
|
|
MultiMap(boolean concurrent)
|
|
MultiMap(int capacity)
|
|
MultiMap(Map<K,Object> map)
|
|
MultiMap(MultiMap<K> map)
|
Method Summary | |
---|---|
void |
add(K name,
Object value)
Add value to multi valued entry. |
void |
addValues(K name,
List<? extends Object> values)
Add values to multi valued entry. |
void |
addValues(K name,
String[] values)
Add values to multi valued entry. |
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set<Map.Entry<K,Object>> |
entrySet()
|
boolean |
equals(Object o)
|
Object |
get(Object name)
|
String |
getString(Object name)
Get value as String. |
Object |
getValue(Object name,
int i)
Get a value from a multiple value. |
List |
getValues(Object name)
Get multiple values. |
int |
hashCode()
|
boolean |
isEmpty()
|
Set<K> |
keySet()
|
Object |
put(K name,
Object value)
Put and entry into the map. |
void |
putAll(Map<? extends K,? extends Object> m)
Put all contents of map. |
Object |
putIfAbsent(K key,
Object value)
|
Object |
putValues(K name,
List<? extends Object> values)
Put multi valued entry. |
Object |
putValues(K name,
String... values)
Put multi valued entry. |
Object |
remove(Object key)
|
boolean |
remove(Object key,
Object value)
|
boolean |
removeValue(K name,
Object value)
Remove value. |
Object |
replace(K key,
Object value)
|
boolean |
replace(K key,
Object oldValue,
Object newValue)
|
int |
size()
|
String |
toString()
|
Map<K,String[]> |
toStringArrayMap()
|
Collection<Object> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiMap()
public MultiMap(Map<K,Object> map)
public MultiMap(MultiMap<K> map)
public MultiMap(int capacity)
public MultiMap(boolean concurrent)
Method Detail |
---|
public List getValues(Object name)
name
- The entry key.
public Object getValue(Object name, int i)
name
- The entry key.i
- Index of element to get.
public String getString(Object name)
name
- The entry key.
public Object get(Object name)
get
in interface Map<K,Object>
public Object put(K name, Object value)
put
in interface Map<K,Object>
name
- The entry key.value
- The entry value.
public Object putValues(K name, List<? extends Object> values)
name
- The entry key.values
- The List of multiple values.
public Object putValues(K name, String... values)
name
- The entry key.values
- The String array of multiple values.
public void add(K name, Object value)
name
- The entry key.value
- The entry value.public void addValues(K name, List<? extends Object> values)
name
- The entry key.values
- The List of multiple values.public void addValues(K name, String[] values)
name
- The entry key.values
- The String array of multiple values.public boolean removeValue(K name, Object value)
name
- The entry key.value
- The entry value.
public void putAll(Map<? extends K,? extends Object> m)
putAll
in interface Map<K,Object>
m
- Mappublic Map<K,String[]> toStringArrayMap()
public String toString()
toString
in class Object
public void clear()
clear
in interface Map<K,Object>
public boolean containsKey(Object key)
containsKey
in interface Map<K,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<K,Object>
public Set<Map.Entry<K,Object>> entrySet()
entrySet
in interface Map<K,Object>
public boolean equals(Object o)
equals
in interface Map<K,Object>
equals
in class Object
public int hashCode()
hashCode
in interface Map<K,Object>
hashCode
in class Object
public boolean isEmpty()
isEmpty
in interface Map<K,Object>
public Set<K> keySet()
keySet
in interface Map<K,Object>
public Object remove(Object key)
remove
in interface Map<K,Object>
public int size()
size
in interface Map<K,Object>
public Collection<Object> values()
values
in interface Map<K,Object>
public Object putIfAbsent(K key, Object value)
putIfAbsent
in interface ConcurrentMap<K,Object>
public boolean remove(Object key, Object value)
remove
in interface ConcurrentMap<K,Object>
public boolean replace(K key, Object oldValue, Object newValue)
replace
in interface ConcurrentMap<K,Object>
public Object replace(K key, Object value)
replace
in interface ConcurrentMap<K,Object>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |