org.apache.catalina.util
public final class: ResourceSet [javadoc |
source]
java.lang.Object
java.util.AbstractCollection
java.util.AbstractSet
java.util.HashSet
org.apache.catalina.util.ResourceSet
All Implemented Interfaces:
Set, Serializable, Cloneable, Collection
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: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
| Methods from java.util.AbstractCollection: |
|---|
|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
| Method from org.apache.catalina.util.ResourceSet Detail: |
public boolean add(Object o) {
// --------------------------------------------------------- Public Methods
if (locked)
throw new IllegalStateException
(sm.getString("resourceSet.locked"));
return (super.add(o));
}
Add the specified element to this set if it is not already present.
Return true if the element was added. |
public void clear() {
if (locked)
throw new IllegalStateException
(sm.getString("resourceSet.locked"));
super.clear();
}
Remove all of the elements from this set. |
public boolean isLocked() {
return (this.locked);
}
Return the locked state of this parameter map. |
public boolean remove(Object o) {
if (locked)
throw new IllegalStateException
(sm.getString("resourceSet.locked"));
return (super.remove(o));
}
Remove the given element from this set if it is present.
Return true if the element was removed. |
public void setLocked(boolean locked) {
this.locked = locked;
}
Set the locked state of this parameter map. |