public final class SetLong extends Object implements Serializable
Constructor and Description |
---|
SetLong()
Create a set of default size
|
SetLong(int initialCapacity)
Create a set of given size
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(long key)
Add a value to the set
|
void |
clear()
clear all the entries
|
boolean |
contains(long key)
Find a value from the set
|
boolean |
isEmpty()
is the set empty
|
IteratorLong |
iterator()
get an iterator to go through the set
|
boolean |
remove(long key)
Remove a value from the set
|
int |
size()
get the number of used entries
|
long[] |
toArray()
convert to an array
|
public SetLong()
public SetLong(int initialCapacity)
initialCapacity
- in number of longspublic boolean add(long key)
key
- the value to addpublic boolean remove(long key)
key
- the value to addpublic boolean contains(long key)
key
- the value to findpublic int size()
public boolean isEmpty()
public void clear()
public IteratorLong iterator()
public long[] toArray()