org.mortbay.util
public class MultiMap extends HashMap implements Cloneable
Implemented as a map of LazyList values
Version: $Id: MultiMap.java,v 1.18 2004/12/15 02:13:51 gregwilkins Exp $
See Also: LazyList
| Constructor Summary | |
|---|---|
| MultiMap() Constructor. | |
| MultiMap(int size) Constructor. | |
| MultiMap(Map map) Constructor. | |
| Method Summary | |
|---|---|
| void | add(Object name, Object value) Add value to multi valued entry.
|
| void | addValues(Object name, List values) Add values to multi valued entry.
|
| void | addValues(Object name, String[] values) Add values to multi valued entry.
|
| Object | clone() |
| 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.
|
| Object | put(Object name, Object value) Put and entry into the map. |
| void | putAll(Map m) Put all contents of map. |
| Object | putValues(Object name, List values) Put multi valued entry. |
| Object | putValues(Object name, String[] values) Put multi valued entry. |
| boolean | removeValue(Object name, Object value) Remove value. |
| Map | toStringArrayMap() |
Parameters: size Capacity of the map
Parameters: map
Parameters: name The entry key. value The entry value.
Parameters: name The entry key. values The List of multiple values.
Parameters: name The entry key. values The String array of multiple values.
Parameters: name The entry key.
Returns: String value.
Parameters: name The entry key. i Index of element to get.
Returns: Unmodifieable List of values.
Parameters: name The entry key.
Returns: Unmodifieable List of values.
Parameters: name The entry key. value The entry value.
Returns: The previous value or null.
Parameters: m Map
Parameters: name The entry key. values The List of multiple values.
Returns: The previous value or null.
Parameters: name The entry key. values The String array of multiple values.
Returns: The previous value or null.
Parameters: name The entry key. value The entry value.
Returns: true if it was removed.
Returns: Map of String arrays