|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.portal.common.util.CollectionMap<K,V>
public abstract class CollectionMap<K,V>
A map of collections.
Field Summary | |
---|---|
protected java.util.Comparator<V> |
comparator
An optional comparator. |
Constructor Summary | |
---|---|
CollectionMap()
|
|
CollectionMap(CollectionMap<K,V> other)
|
|
CollectionMap(CollectionMap<K,V> other,
java.util.Comparator<V> comparator)
|
|
CollectionMap(java.util.Comparator<V> comparator)
|
Method Summary | |
---|---|
protected abstract void |
add(java.util.Collection<V> c,
V o)
|
boolean |
contains(K key,
java.lang.Object o)
Return true if the specified set contains the object o. |
java.util.Collection<V> |
get(K key)
Return the collection specified by the key. |
java.util.Iterator<V> |
iterator(K key)
Return an iterator over the values in the set specified by the key. |
java.util.Set<K> |
keySet()
Return the set of keys. |
protected abstract java.util.Collection<V> |
newCollection()
|
protected abstract java.util.Collection<V> |
newCollection(java.util.Collection<V> other)
|
void |
put(K key,
V o)
Add an object in the set keyed under the specified key. |
protected abstract void |
remove(java.util.Collection<V> c,
java.lang.Object o)
Removes an object from the collection. |
void |
remove(K key)
Remove the entire set of objects specified by the key. |
void |
remove(K key,
java.lang.Object o)
Remove an object in the set keyed under the specified key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Comparator<V> comparator
Constructor Detail |
---|
public CollectionMap()
public CollectionMap(CollectionMap<K,V> other) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public CollectionMap(CollectionMap<K,V> other, java.util.Comparator<V> comparator) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public CollectionMap(java.util.Comparator<V> comparator)
Method Detail |
---|
public final void put(K key, V o) throws java.lang.NullPointerException
java.lang.NullPointerException
- if the key is nullpublic final java.util.Set<K> keySet()
public final void remove(K key) throws java.lang.NullPointerException
java.lang.NullPointerException
- if the key is nullpublic final void remove(K key, java.lang.Object o) throws java.lang.NullPointerException
java.lang.NullPointerException
- if the key is nullpublic final boolean contains(K key, java.lang.Object o) throws java.lang.NullPointerException
java.lang.NullPointerException
- if the key is nullpublic java.util.Collection<V> get(K key)
public final java.util.Iterator<V> iterator(K key)
java.lang.NullPointerException
- if the key is nullprotected abstract void add(java.util.Collection<V> c, V o)
protected abstract void remove(java.util.Collection<V> c, java.lang.Object o)
Object
and
not the parameterized type
because the Collection
c
- the collection to remove fromo
- the object to removeprotected abstract java.util.Collection<V> newCollection()
protected abstract java.util.Collection<V> newCollection(java.util.Collection<V> other)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |