|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap
org.jpox.util.MultiMap
public class MultiMap
An implementation of a MultiMap
, which is basically a Map
with multiple values for a key. This will be removed when SUN see sense and
include it in the JDK java.util package as standard.
Constructor Summary | |
---|---|
MultiMap()
Constructor. |
|
MultiMap(int initialCapacity)
Constructor. |
|
MultiMap(int initialCapacity,
float loadFactor)
Constructor. |
|
MultiMap(java.util.Map map)
Constructor. |
Method Summary | |
---|---|
void |
clear()
Clear the map. |
java.lang.Object |
clone()
Method to clone the Map. |
boolean |
containsValue(java.lang.Object value)
Check if the map contains the passed value. |
protected java.util.Collection |
createCollection(java.util.Collection c)
Creates a new instance of the map value Collection container. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Add a key, and its value, to the map. |
java.lang.Object |
remove(java.lang.Object key,
java.lang.Object item)
Removes a specific value from map. |
java.util.Collection |
values()
Accessor for the values in the Map. |
Methods inherited from class java.util.HashMap |
---|
containsKey, entrySet, get, isEmpty, keySet, putAll, remove, size |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public MultiMap()
public MultiMap(int initialCapacity)
initialCapacity
- the initial capacitypublic MultiMap(int initialCapacity, float loadFactor)
initialCapacity
- initial capacityloadFactor
- load factor for the Map.public MultiMap(java.util.Map map)
map
- The initial Map.Method Detail |
---|
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
containsValue
in class java.util.HashMap
value
- the value to search for
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
put
in class java.util.HashMap
key
- the key to setvalue
- the value to set the key to
public java.lang.Object remove(java.lang.Object key, java.lang.Object item)
key
- the key to remove fromitem
- the value to remove
public void clear()
clear
in interface java.util.Map
clear
in class java.util.HashMap
public java.util.Collection values()
values
in interface java.util.Map
values
in class java.util.HashMap
public java.lang.Object clone()
clone
in class java.util.HashMap
protected java.util.Collection createCollection(java.util.Collection c)
c
- the collection to copy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |