org.apache.catalina.util
Class ResourceSet
HashSet
org.apache.catalina.util.ResourceSet
public final class ResourceSet
extends HashSet
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.
Version:
- Craig R. McClanahan
ResourceSet() - Construct a new, empty set with the default initial capacity and
load factor.
|
ResourceSet(Collection coll) - Construct a new set with the same contents as the existing collection.
|
ResourceSet(int initialCapacity) - Construct a new, empty set with the specified initial capacity and
default load factor.
|
ResourceSet(int initialCapacity, float loadFactor) - Construct a new, empty set with the specified initial capacity and
load factor.
|
boolean | add(Object o) - Add the specified element to this set if it is not already present.
|
void | clear() - Remove all of the elements from this set.
|
boolean | isLocked() - Return the locked state of this parameter map.
|
boolean | remove(Object o) - Remove the given element from this set if it is present.
|
void | setLocked(boolean locked) - Set the locked state of this parameter map.
|
ResourceSet
public ResourceSet()
Construct a new, empty set with the default initial capacity and
load factor.
ResourceSet
public ResourceSet(Collection coll)
Construct a new set with the same contents as the existing collection.
coll
- The collection whose contents we should copy
ResourceSet
public ResourceSet(int initialCapacity)
Construct a new, empty set with the specified initial capacity and
default load factor.
initialCapacity
- The initial capacity of this set
ResourceSet
public ResourceSet(int initialCapacity,
float loadFactor)
Construct a new, empty set with the specified initial capacity and
load factor.
initialCapacity
- The initial capacity of this setloadFactor
- The load factor of this set
add
public boolean add(Object o)
Add the specified element to this set if it is not already present.
Return true
if the element was added.
o
- The object to be added
clear
public void clear()
Remove all of the elements from this set.
isLocked
public boolean isLocked()
Return the locked state of this parameter map.
remove
public boolean remove(Object o)
Remove the given element from this set if it is present.
Return true
if the element was removed.
o
- The object to be removed
setLocked
public void setLocked(boolean locked)
Set the locked state of this parameter map.
locked
- The new locked state
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.