org.jboss.portal.common.util
Class SetMap

java.lang.Object
  extended by org.jboss.portal.common.util.SetMap
All Implemented Interfaces:
java.io.Serializable

public class SetMap
extends java.lang.Object
implements java.io.Serializable

A map of set. This object does not handle synchronization and use HashMap and HashSet as underlying data structures;

See Also:
Serialized Form

Constructor Summary
SetMap()
           
SetMap(SetMap other)
          Copy constructor.
 
Method Summary
 boolean contains(java.lang.Object key, java.lang.Object o)
          Return true if the specified set contains the object o.
 java.util.Set get(java.lang.Object key)
          Return the set specified by the key.
 java.util.Iterator iterator(java.lang.Object key)
          Return an iterator over the values in the set specified by the key.
 java.util.Set keySet()
          Return the set of keys.
 void put(java.lang.Object key, java.lang.Object o)
          Add an object in the set keyed under the specified key.
 void remove(java.lang.Object key)
          Remove the entire set of objects specified by the key.
 void remove(java.lang.Object 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
 

Constructor Detail

SetMap

public SetMap()

SetMap

public SetMap(SetMap other)
       throws java.lang.IllegalArgumentException
Copy constructor.

Throws:
java.lang.IllegalArgumentException - if the argument is null
Method Detail

put

public void put(java.lang.Object key,
                java.lang.Object o)
Add an object in the set keyed under the specified key.


keySet

public java.util.Set keySet()
Return the set of keys.


remove

public void remove(java.lang.Object key)
Remove the entire set of objects specified by the key.


remove

public void remove(java.lang.Object key,
                   java.lang.Object o)
Remove an object in the set keyed under the specified key.


contains

public boolean contains(java.lang.Object key,
                        java.lang.Object o)
Return true if the specified set contains the object o.


get

public java.util.Set get(java.lang.Object key)
Return the set specified by the key.


iterator

public java.util.Iterator iterator(java.lang.Object key)
Return an iterator over the values in the set specified by the key.