org.jfree.util
public class HashNMap extends Object implements Serializable, Cloneable
Constructor Summary | |
---|---|
HashNMap()
Default constructor. |
Method Summary | |
---|---|
boolean | add(Object key, Object val)
Adds a new key/value pair into this map. |
void | clear()
Clears all keys and values of this map. |
Object | clone()
Creates a deep copy of this HashNMap.
|
boolean | contains(Object value)
Tests whether this map contains the given key or value.
|
boolean | containsKey(Object key)
Tests whether this map contains the given key.
|
boolean | containsValue(Object value)
Tests whether this map contains the given value.
|
boolean | containsValue(Object key, Object value)
Tests whether this map contains the given value.
|
protected List | createList()
Returns a new empty list.
|
Object | get(Object key, int n)
Retrieves the n-th value registered for an key or null if there was no
such key in the list. |
Iterator | getAll(Object key)
Returns an iterator over all elements registered to the given key.
|
Object | getFirst(Object key)
Retrieves the first value registered for an key or null if there was no
such key in the list.
|
int | getValueCount(Object key)
Returns the number of elements registered with the given key.
|
Iterator | keys()
Returns all registered keys as an enumeration.
|
Set | keySet()
Returns all registered keys as set.
|
boolean | put(Object key, Object val)
Inserts a new key/value pair into the map. |
boolean | remove(Object key, Object value)
Removes the key/value pair from the map. |
void | removeAll(Object key)
Removes all elements for the given key.
|
Object[] | toArray(Object key, Object[] data)
Returns the contents for the given key as object array. |
Object[] | toArray(Object key)
Returns the contents for the given key as object array. |
Parameters: key the key. val the value.
Returns: true, if the value has been added, false otherwise
Returns: a clone.
Throws: CloneNotSupportedException this should never happen.
Parameters: value the value.
Returns: true if the key or value is contained in the map
Parameters: key the key.
Returns: true if the key is contained in the map
Parameters: value the value.
Returns: true if the value is registered in the map for an key.
Parameters: value the value. key the key under which to find the value
Returns: true if the value is registered in the map for an key.
Returns: A new empty list.
Parameters: key the key. n the index.
Returns: the object.
Parameters: key the key.
Returns: an iterator.
Parameters: key the key.
Returns: the value.
Parameters: key the key.
Returns: the number of element for this key, or 0 if there are no elements registered.
Returns: an enumeration of the keys.
Returns: a set of keys.
Parameters: key the key. val the value.
Returns: A boolean.
Parameters: key the key. value the value.
Returns: true, if removing the element was successfull, false otherwise.
Parameters: key the key.
Parameters: key the key. data the object array to receive the contents.
Returns: the contents.
Parameters: key the key.
Returns: the contents.