|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractMap | +--java.util.HashMap | +--org.mortbay.util.MultiMap
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 FormConstructor Summary | |
MultiMap()
Constructor. |
|
MultiMap(int size)
Constructor. |
|
MultiMap(java.util.Map map)
Constructor. |
Method Summary | |
void |
add(java.lang.Object name,
java.lang.Object value)
Add value to multi valued entry. |
void |
addValues(java.lang.Object name,
java.util.List values)
Add values to multi valued entry. |
void |
addValues(java.lang.Object name,
java.lang.String[] values)
Add values to multi valued entry. |
java.lang.Object |
clone()
|
java.lang.Object |
get(java.lang.Object name)
|
java.lang.String |
getString(java.lang.Object name)
Get value as String. |
java.lang.Object |
getValue(java.lang.Object name,
int i)
Get a value from a multiple value. |
java.util.List |
getValues(java.lang.Object name)
Get multiple values. |
java.lang.Object |
put(java.lang.Object name,
java.lang.Object value)
Put and entry into the map. |
void |
putAll(java.util.Map m)
Put all contents of map. |
java.lang.Object |
putValues(java.lang.Object name,
java.util.List values)
Put multi valued entry. |
java.lang.Object |
putValues(java.lang.Object name,
java.lang.String[] values)
Put multi valued entry. |
boolean |
removeValue(java.lang.Object name,
java.lang.Object value)
Remove value. |
java.util.Map |
toStringArrayMap()
|
Methods inherited from class java.util.HashMap |
clear, containsKey, containsValue, entrySet, isEmpty, keySet, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
Constructor Detail |
public MultiMap()
public MultiMap(int size)
size
- Capacity of the mappublic MultiMap(java.util.Map map)
map
- Method Detail |
public java.util.List getValues(java.lang.Object name)
name
- The entry key.
public java.lang.Object getValue(java.lang.Object name, int i)
name
- The entry key.i
- Index of element to get.
public java.lang.String getString(java.lang.Object name)
name
- The entry key.
public java.lang.Object get(java.lang.Object name)
get
in interface java.util.Map
get
in class java.util.HashMap
public java.lang.Object put(java.lang.Object name, java.lang.Object value)
put
in interface java.util.Map
put
in class java.util.HashMap
name
- The entry key.value
- The entry value.
public java.lang.Object putValues(java.lang.Object name, java.util.List values)
name
- The entry key.values
- The List of multiple values.
public java.lang.Object putValues(java.lang.Object name, java.lang.String[] values)
name
- The entry key.values
- The String array of multiple values.
public void add(java.lang.Object name, java.lang.Object value)
name
- The entry key.value
- The entry value.public void addValues(java.lang.Object name, java.util.List values)
name
- The entry key.values
- The List of multiple values.public void addValues(java.lang.Object name, java.lang.String[] values)
name
- The entry key.values
- The String array of multiple values.public boolean removeValue(java.lang.Object name, java.lang.Object value)
name
- The entry key.value
- The entry value.
public void putAll(java.util.Map m)
putAll
in interface java.util.Map
putAll
in class java.util.HashMap
m
- Mappublic java.util.Map toStringArrayMap()
public java.lang.Object clone()
clone
in class java.util.HashMap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |