|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.report.util.HashNMap
The HashNMap can be used to store multiple values by a single key value. The values stored can be retrieved using a direct query or by creating an enumeration over the stored elements.
Constructor Summary | |
HashNMap()
Default constructor. |
Method Summary | |
void |
add(java.lang.Object key,
java.lang.Object val)
Adds a new key/value pair into this map. |
void |
clear()
Clears all keys and values of this map. |
java.lang.Object |
clone()
Creates a deep copy of this HashNMap. |
boolean |
contains(java.lang.Object value)
Tests whether this map contains the given key or value. |
boolean |
containsKey(java.lang.Object key)
Tests whether this map contains the given key. |
boolean |
containsValue(java.lang.Object value)
Tests whether this map contains the given value. |
java.lang.Object |
get(java.lang.Object key,
int n)
Retrieves the n-th value registered for an key or null if there was no such key in the list. |
java.util.Iterator |
getAll(java.lang.Object key)
Returns an iterator over all elements registered to the given key. |
java.lang.Object |
getFirst(java.lang.Object key)
Retrieves the first value registered for an key or null if there was no such key in the list. |
int |
getValueCount(java.lang.Object key)
Returns the number of elements registered with the given key. |
java.util.Iterator |
keys()
Returns all registered keys as an enumeration. |
java.util.Set |
keySet()
Returns all registered keys as set. |
void |
put(java.lang.Object key,
java.lang.Object val)
Inserts a new key/value pair into the map. |
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Removes the key/value pair from the map. |
void |
removeAll(java.lang.Object key)
Removes all elements for the given key. |
java.lang.Object[] |
toArray(java.lang.Object key)
Returns the contents for the given key as object array. |
java.lang.Object[] |
toArray(java.lang.Object key,
java.lang.Object[] data)
Returns the contents for the given key as object array. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HashNMap()
Method Detail |
public void put(java.lang.Object key, java.lang.Object val)
key
- the key.val
- the value.public void add(java.lang.Object key, java.lang.Object val)
key
- the key.val
- the value.public java.lang.Object getFirst(java.lang.Object key)
key
- the key.
public java.lang.Object get(java.lang.Object key, int n)
key
- the key.n
- the index.
public java.util.Iterator getAll(java.lang.Object key)
key
- the key.
public java.util.Iterator keys()
public java.util.Set keySet()
public boolean remove(java.lang.Object key, java.lang.Object value)
key
- the key.value
- the value.
public void removeAll(java.lang.Object key)
key
- the key.public void clear()
public boolean containsKey(java.lang.Object key)
key
- the key.
public boolean containsValue(java.lang.Object value)
value
- the value.
public boolean contains(java.lang.Object value)
value
- the value.
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- this should never happen.public java.lang.Object[] toArray(java.lang.Object key, java.lang.Object[] data)
key
- the key.data
- the object array to receive the contents.
public java.lang.Object[] toArray(java.lang.Object key)
key
- the key.
public int getValueCount(java.lang.Object key)
key
- the key.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |