public final class ResourceSet extends HashSet
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.Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
clone, contains, isEmpty, iterator, size, spliterator
equals, hashCode, removeAll
addAll, containsAll, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
parallelStream, removeIf, stream
public ResourceSet()
public ResourceSet(int initialCapacity)
initialCapacity
- The initial capacity of this setpublic ResourceSet(int initialCapacity, float loadFactor)
initialCapacity
- The initial capacity of this setloadFactor
- The load factor of this setpublic ResourceSet(Collection coll)
coll
- The collection whose contents we should copypublic boolean isLocked()
public void setLocked(boolean locked)
locked
- The new locked statepublic boolean add(Object o)
true
if the element was added.add
in interface Collection
add
in interface Set
add
in class HashSet
o
- The object to be addedIllegalStateException
- if this ResourceSet is lockedpublic void clear()
clear
in interface Collection
clear
in interface Set
clear
in class HashSet
IllegalStateException
- if this ResourceSet is lockedpublic boolean remove(Object o)
true
if the element was removed.remove
in interface Collection
remove
in interface Set
remove
in class HashSet
o
- The object to be removedIllegalStateException
- if this ResourceSet is lockedCopyright © 2018 JBoss by Red Hat. All rights reserved.