| java.util.HashSet org.apache.catalina.util.ResourceSet
ResourceSet | final public class ResourceSet extends HashSet (Code) | | Extended implementation of HashSet that includes a
locked property. This class can be used to safely expose
resource path sets to user classes without having to clone them in order
to avoid modifications. When first created, a ResourceMap
is not locked.
author: Craig R. McClanahan version: $Revision: 1.3 $ $Date: 2004/02/27 14:58:50 $ |
Constructor Summary | |
public | ResourceSet() Construct a new, empty set with the default initial capacity and
load factor. | public | ResourceSet(int initialCapacity) Construct a new, empty set with the specified initial capacity and
default load factor. | public | ResourceSet(int initialCapacity, float loadFactor) Construct a new, empty set with the specified initial capacity and
load factor. | public | ResourceSet(Collection coll) Construct a new set with the same contents as the existing collection. |
Method Summary | |
public boolean | add(Object o) Add the specified element to this set if it is not already present. | public void | clear() Remove all of the elements from this set. | public boolean | isLocked() Return the locked state of this parameter map. | public boolean | remove(Object o) Remove the given element from this set if it is present. | public void | setLocked(boolean locked) Set the locked state of this parameter map. |
ResourceSet | public ResourceSet()(Code) | | Construct a new, empty set with the default initial capacity and
load factor.
|
ResourceSet | public ResourceSet(int initialCapacity)(Code) | | Construct a new, empty set with the specified initial capacity and
default load factor.
Parameters: initialCapacity - The initial capacity of this set |
ResourceSet | public ResourceSet(int initialCapacity, float loadFactor)(Code) | | Construct a new, empty set with the specified initial capacity and
load factor.
Parameters: initialCapacity - The initial capacity of this set Parameters: loadFactor - The load factor of this set |
ResourceSet | public ResourceSet(Collection coll)(Code) | | Construct a new set with the same contents as the existing collection.
Parameters: coll - The collection whose contents we should copy |
add | public boolean add(Object o)(Code) | | Add the specified element to this set if it is not already present.
Return true if the element was added.
Parameters: o - The object to be added exception: IllegalStateException - if this ResourceSet is locked |
clear | public void clear()(Code) | | Remove all of the elements from this set.
exception: IllegalStateException - if this ResourceSet is locked |
isLocked | public boolean isLocked()(Code) | | Return the locked state of this parameter map.
|
remove | public boolean remove(Object o)(Code) | | Remove the given element from this set if it is present.
Return true if the element was removed.
Parameters: o - The object to be removed exception: IllegalStateException - if this ResourceSet is locked |
setLocked | public void setLocked(boolean locked)(Code) | | Set the locked state of this parameter map.
Parameters: locked - The new locked state |
|
|