|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object velosurf.util.HashMultiMap
public class HashMultiMap
A MultiMap is a Map allowing multiple occurrences of keys.
Map
Field Summary | |
---|---|
private java.util.Map |
map
inner map. |
private int |
sizeAll
total number of values. |
Constructor Summary | |
---|---|
HashMultiMap()
build a new HashMultiMap. |
Method Summary | |
---|---|
void |
clear()
Removes all mappings from this map (optional operation). |
boolean |
containsKey(java.lang.Object key)
Returns true if this multimap contains a mapping for the specified key. |
boolean |
containsValue(java.lang.Object value)
Returns true if this multimap maps one or more keys to the specified value. |
boolean |
equals(java.lang.Object o)
Compares the specified object with this multimap for equality. |
java.util.List |
get(java.lang.Object key)
Returns a list of values to which this multimap maps the specified key. |
int |
hashCode()
Returns the hash code value for this multimap. |
boolean |
isEmpty()
Returns true if this multimap contains no mappings. |
java.util.Set |
keySet()
Returns a set view of the keys contained in this multimap. |
void |
put(java.lang.Object key,
java.lang.Object value)
Adds the specified value with the specified key to this multimap. |
void |
putAll(MultiMap t)
Copies all entries from the specified multimap to this multimap. |
void |
remove(java.lang.Object key)
Removes all mappings for this key from this multimap if present. |
void |
remove(java.lang.Object key,
java.lang.Object value)
Removes the specified key/value mapping from this multimap if present. |
int |
size()
Returns the number of values in this multimap. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Map map
private transient int sizeAll
Constructor Detail |
---|
public HashMultiMap()
Method Detail |
---|
public int size()
size
in interface MultiMap
public boolean isEmpty()
isEmpty
in interface MultiMap
public boolean containsKey(java.lang.Object key)
containsKey
in interface MultiMap
key
-
public boolean containsValue(java.lang.Object value)
containsValue
in interface MultiMap
public java.util.List get(java.lang.Object key)
get
in interface MultiMap
public void put(java.lang.Object key, java.lang.Object value)
put
in interface MultiMap
key
- value
- public void putAll(MultiMap t)
putAll
in interface MultiMap
t
- source multimappublic void remove(java.lang.Object key)
remove
in interface MultiMap
key
- public void remove(java.lang.Object key, java.lang.Object value)
remove
in interface MultiMap
key
- value
- public void clear()
clear
in interface MultiMap
public java.util.Set keySet()
keySet
in interface MultiMap
public boolean equals(java.lang.Object o)
equals
in interface MultiMap
equals
in class java.lang.Object
o
-
public int hashCode()
hashCode
in interface MultiMap
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |