java.io.Serializablepublic class IntArraySet
extends java.lang.Object
implements java.io.Serializable
| Constructor | Description |
|---|---|
IntArraySet() |
Create an empty set
|
IntArraySet(IntArraySet input) |
Create one IntArraySet as a copy of another
|
IntArraySet(IntHashSet input) |
Create a set containing integers from the specified IntHashSet
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
add(int value) |
Add an integer to the set
|
void |
clear() |
|
boolean |
contains(int value) |
|
boolean |
equals(java.lang.Object other) |
Test whether this set has exactly the same members as another set
|
int |
getFirst() |
Get the first value in the set.
|
int[] |
getValues() |
|
int |
hashCode() |
Construct a hash key that supports the equals() test
|
boolean |
isEmpty() |
|
IntIterator |
iterator() |
Get an iterator over the values
|
static IntArraySet |
make(int[] in,
int size) |
|
boolean |
remove(int value) |
|
int |
size() |
|
java.lang.String |
toString() |
|
IntArraySet |
union(IntArraySet other) |
Form a new set that is the union of this set with another set.
|
public IntArraySet()
public IntArraySet(IntHashSet input)
public IntArraySet(IntArraySet input)
public void clear()
public int size()
public boolean isEmpty()
public int[] getValues()
public boolean contains(int value)
public boolean remove(int value)
public boolean add(int value)
value - the integer to be addedpublic int getFirst()
java.lang.ArrayIndexOutOfBoundsException - if the set is emptypublic IntIterator iterator()
public IntArraySet union(IntArraySet other)
public static IntArraySet make(int[] in, int size)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object