|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.javasoft.util.map.AbstractMultiValueMap<K,V>
public abstract class AbstractMultiValueMap<K,V>
Abstract implementation for MultiValueMap for most common methods.
For subclasses implementing mutable maps, subclassing
AbstractMutableMultiValueMap might be advantageous.
| Constructor Summary | |
|---|---|
AbstractMultiValueMap()
Constructor for an empty mapping |
|
| Method Summary | |
|---|---|
boolean |
add(K key,
V value)
Always throws an UnsupportedOperationException |
boolean |
addAll(K key,
Collection<? extends V> values)
Always throws an UnsupportedOperationException |
boolean |
addAll(K key,
V... values)
Always throws an UnsupportedOperationException |
boolean |
addAll(Map<? extends K,? extends V> map)
Always throws an UnsupportedOperationException |
boolean |
addAll(MultiValueMap<? extends K,? extends V> mapping)
Always throws an UnsupportedOperationException |
boolean |
addAllNested(Map<? extends K,? extends Collection<? extends V>> map)
Always throws an UnsupportedOperationException |
Map<K,? extends Collection<V>> |
asCollectionMap()
Implementation returns a linked hash map containing
ArrayList instances. |
Map<K,V> |
asSingleValueMap()
Implementation returns a linked hash map containing
the single values. |
boolean |
clear()
Always throws an UnsupportedOperationException |
boolean |
contains(Object key)
Returns true if the value collection is non-empty |
boolean |
equals(Object obj)
|
V |
getFirst(Object key)
Returns the first value of the value collection, or null if no such value exists |
int |
hashCode()
|
MultiValueMap<V,K> |
invert()
Implementation returns a new DefaultMultiValueMap instance. |
boolean |
isEmpty()
Returns true if this map is empty |
int |
keySize()
Returns the number of keys contained in this mapping |
boolean |
remove(Object key)
Always throws an UnsupportedOperationException |
boolean |
remove(Object key,
V value)
Always throws an UnsupportedOperationException |
String |
toString()
|
Iterable<V> |
values()
Returns an unmodifiable iterator for all values |
int |
valueSize()
Returns the number of values contained in this mapping |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ch.javasoft.util.map.MultiValueMap |
|---|
contains, count, get, keySet |
| Constructor Detail |
|---|
public AbstractMultiValueMap()
| Method Detail |
|---|
public boolean add(K key,
V value)
UnsupportedOperationException
add in interface MultiValueMap<K,V>key - the key which identifies the value collectionvalue - the value to add
public boolean addAll(K key,
Collection<? extends V> values)
UnsupportedOperationException
addAll in interface MultiValueMap<K,V>key - the key which identifies the value collectionvalues - the values to add
public boolean addAll(K key,
V... values)
UnsupportedOperationException
addAll in interface MultiValueMap<K,V>key - the key which identifies the value collectionvalues - the values to add
public boolean addAll(Map<? extends K,? extends V> map)
UnsupportedOperationException
addAll in interface MultiValueMap<K,V>map - the map containing key/value-collection entries to add
public boolean addAll(MultiValueMap<? extends K,? extends V> mapping)
UnsupportedOperationException
addAll in interface MultiValueMap<K,V>mapping - the mapping containing key/value-collection entries to add
public boolean addAllNested(Map<? extends K,? extends Collection<? extends V>> map)
UnsupportedOperationException
addAllNested in interface MultiValueMap<K,V>map - the map containing key/value-collection entries to add
public boolean clear()
UnsupportedOperationException
clear in interface MultiValueMap<K,V>public boolean remove(Object key)
UnsupportedOperationException
remove in interface MultiValueMap<K,V>key - the key which identifies the value collection
public boolean remove(Object key,
V value)
UnsupportedOperationException
remove in interface MultiValueMap<K,V>key - the key which identifies the value collectionvalue - the value to remove
public V getFirst(Object key)
MultiValueMap
getFirst in interface MultiValueMap<K,V>key - the key which identifies the value collection
public boolean contains(Object key)
MultiValueMap
contains in interface MultiValueMap<K,V>key - the key which identifies the value collection
public Map<K,? extends Collection<V>> asCollectionMap()
linked hash map containing
ArrayList instances.
Changing the returned map does not affect this multi value map.
asCollectionMap in interface MultiValueMap<K,V>MultiValueMap.asCollectionMap()public Map<K,V> asSingleValueMap()
linked hash map containing
the single values.
Changing the returned map does not affect this multi value map.
asSingleValueMap in interface MultiValueMap<K,V>MultiValueMap.asSingleValueMap()public MultiValueMap<V,K> invert()
DefaultMultiValueMap instance.
Changing the returned map does not affect this multi value map.
invert in interface MultiValueMap<K,V>MultiValueMap.invert()public int keySize()
MultiValueMap
keySize in interface MultiValueMap<K,V>public int valueSize()
MultiValueMap
valueSize in interface MultiValueMap<K,V>public boolean isEmpty()
MultiValueMap
isEmpty in interface MultiValueMap<K,V>public Iterable<V> values()
values in interface MultiValueMap<K,V>MultiValueMap.values()public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||