站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

SetMap - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.common.util
Class SetMap

java.lang.Object
  extended byorg.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;

Version:
$Revision: 5451 $
Author:
Julien Viet
See Also:
Serialized Form

Field Summary
protected  java.util.Comparator comparator
          An optional comparator.
protected  java.util.Map map
          The underlying map.
(package private) static long serialVersionUID
          Version.
 
Constructor Summary
SetMap()
           
SetMap(java.util.Comparator comparator)
           
SetMap(SetMap other)
           
SetMap(SetMap other, java.util.Comparator comparator)
          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.
private  void init(SetMap other, java.util.Comparator comparator)
           
 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.
private  java.util.Set newSet()
           
private  java.util.Set newSet(java.util.Set other)
           
 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
 

Field Detail

serialVersionUID

static final long serialVersionUID
Version.

See Also:
Constant Field Values

map

protected java.util.Map map
The underlying map.


comparator

protected java.util.Comparator comparator
An optional comparator.

Constructor Detail

SetMap

public SetMap()

SetMap

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

SetMap

public SetMap(SetMap other,
              java.util.Comparator comparator)
       throws java.lang.IllegalArgumentException
Copy constructor.

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

SetMap

public SetMap(java.util.Comparator comparator)
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.


init

private void init(SetMap other,
                  java.util.Comparator comparator)

newSet

private java.util.Set newSet()

newSet

private java.util.Set newSet(java.util.Set other)