org.jboss.portal.common.util
Class ListMap<K,V>
java.lang.Object
org.jboss.portal.common.util.CollectionMap<K,V>
org.jboss.portal.common.util.ListMap<K,V>
- All Implemented Interfaces:
- java.io.Serializable
public class ListMap<K,V>
- extends CollectionMap<K,V>
- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
- See Also:
- Serialized Form
Field Summary |
protected java.util.Comparator<V> |
comparator
An optional comparator. |
Method Summary |
protected void |
add(java.util.Collection<V> c,
V o)
|
java.util.List<V> |
get(K key)
Return the list specified by the key. |
protected java.util.Collection<V> |
newCollection()
|
protected java.util.Collection<V> |
newCollection(java.util.Collection<V> other)
|
protected void |
remove(java.util.Collection<V> c,
java.lang.Object o)
Removes an object from the collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
comparator
protected java.util.Comparator<V> comparator
- An optional comparator.
ListMap
public ListMap()
ListMap
public ListMap(SetMap<K,V> other)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
ListMap
public ListMap(SetMap<K,V> other,
java.util.Comparator<V> comparator)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
ListMap
public ListMap(java.util.Comparator<V> comparator)
get
public java.util.List<V> get(K key)
- Return the list specified by the key.
- Overrides:
get
in class CollectionMap<K,V>
add
protected void add(java.util.Collection<V> c,
V o)
- Specified by:
add
in class CollectionMap<K,V>
remove
protected void remove(java.util.Collection<V> c,
java.lang.Object o)
- Description copied from class:
CollectionMap
- Removes an object from the collection. The type of the object to remove is intentionnally
Object
and not the parameterized type
because the Collection
interface is designed that way.
- Specified by:
remove
in class CollectionMap<K,V>
- Parameters:
c
- the collection to remove fromo
- the object to remove
newCollection
protected java.util.Collection<V> newCollection()
- Specified by:
newCollection
in class CollectionMap<K,V>
newCollection
protected java.util.Collection<V> newCollection(java.util.Collection<V> other)
- Specified by:
newCollection
in class CollectionMap<K,V>