|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectezvcard.util.ListMultimap<K,V>
K - the keyV - the valuepublic class ListMultimap<K,V>
A multimap that uses List objects to store its values.
The internal Map implementation is a LinkedHashMap that uses
ArrayList for its values.
| Constructor Summary | |
|---|---|
ListMultimap()
|
|
ListMultimap(ListMultimap<K,V> orig)
Copy constructor. |
|
| Method Summary | |
|---|---|
List<V> |
get(K key)
Gets the values associated with the key. |
Map<K,List<V>> |
getMap()
Gets the underlying Map object. |
boolean |
isEmpty()
Determines if the multimap is empty or not. |
Set<K> |
keySet()
Returns all the keys. |
void |
put(K key,
V value)
Adds a value to the multimap. |
List<V> |
remove(K key)
Removes all the values associated with a key |
boolean |
remove(K key,
V value)
Removes a particular value. |
int |
size()
Returns the number of values in the map. |
Collection<V> |
values()
Returns all the values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListMultimap()
public ListMultimap(ListMultimap<K,V> orig)
orig - the multimap to copy from| Method Detail |
|---|
public void put(K key,
V value)
key - the keyvalue - the valuepublic List<V> get(K key)
key - the key
public List<V> remove(K key)
key - the key to remove
public boolean remove(K key,
V value)
key - the keyvalue - the value to remove
public Set<K> keySet()
public Collection<V> values()
public boolean isEmpty()
public int size()
public Map<K,List<V>> getMap()
Map object.
Map object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||