| Constructor and Description |
|---|
ListIntSet()
Constructs an instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int value)
Adds an int to a set
|
int |
elements()
Returns the count of unique elements in this set.
|
boolean |
has(int value)
Checks to see if a value is in the set
|
IntIterator |
iterator()
Iterates the set
|
void |
merge(IntSet other)
Merges
other into this set, so this set becomes the
union of the two. |
void |
remove(int value)
Removes an int from a set.
|
java.lang.String |
toString() |
public void add(int value)
public void remove(int value)
public boolean has(int value)
public void merge(IntSet other)
other into this set, so this set becomes the
union of the two.public int elements()
public IntIterator iterator()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2020. All Rights Reserved.