| Constructor and Description |
|---|
BitIntSet(int max)
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.
|
String |
toString() |
public BitIntSet(int max)
max - the maximum value of ints in this set.public void add(int value)
IntSetpublic void remove(int value)
IntSetpublic boolean has(int value)
IntSetpublic void merge(IntSet other)
IntSetother into this set, so this set becomes the
union of the two.public int elements()
IntSetpublic IntIterator iterator()
IntSetCopyright © 2016. All Rights Reserved.