public class ObjectSet extends SetBase
A set of value type object.
Uses the property and function naming conventions of the JavaScript Set object.
| Constructor and Description |
|---|
ObjectSet()
See ObjectSet(int).
|
ObjectSet(int capacity)
Construct a new set with
ObjectSet.size of zero and optional initial capacity. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.Object value)
Add
value to this set. |
ObjectSet |
addThis(java.lang.Object value)
Add
value to this set. |
boolean |
delete(java.lang.Object value)
Delete
value from this set. |
boolean |
has(java.lang.Object value)
Return
true if this set contains value. |
ObjectList |
values()
Return a list of the values in this set.
|
public static final ObjectSet empty
public ObjectSet()
public ObjectSet(int capacity)
Construct a new set with ObjectSet.size of zero and optional initial capacity.
A set can expand in size beyond its initial capacity, but best performance
will be obtained if the initial capacity is close to the set's maximum size.
capacity - Optional initial capacity.public void add(java.lang.Object value)
Add value to this set.
value - Value to be added.public ObjectSet addThis(java.lang.Object value)
Add value to this set.
value - Value to be added.public boolean delete(java.lang.Object value)
Delete value from this set.
value - Value to be deleted.true if the value was found (and deleted).public boolean has(java.lang.Object value)
Return true if this set contains value.
value - Value to be found.true if this set contains value.public ObjectList values()
Return a list of the values in this set.