public class AnySet extends SetBase
A set of value type any.
Uses the property and function naming conventions of the JavaScript Set object.
| Constructor and Description |
|---|
AnySet()
See AnySet(int).
|
AnySet(int capacity)
Construct a new set with
AnySet.size of zero and optional initial capacity. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.Object value)
Add
value to this set. |
AnySet |
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. |
AnyList |
values()
Return a list of the values in this set.
|
public static final AnySet empty
public AnySet()
public AnySet(int capacity)
Construct a new set with AnySet.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 - (nullable) Value to be added.public AnySet addThis(java.lang.Object value)
Add value to this set.
value - (nullable) Value to be added.public boolean delete(java.lang.Object value)
Delete value from this set.
value - (nullable) 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 - (nullable) Value to be found.true if this set contains value.public AnyList values()
Return a list of the values in this set.