|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.mat.collect.SetInt
public final class SetInt
Utility class to hold a set of ints Similar to a Set, but efficient for ints
Constructor Summary | |
---|---|
SetInt()
Create a set of default size |
|
SetInt(int initialCapacity)
Create a set of given size |
Method Summary | |
---|---|
boolean |
add(int key)
Add a value to the set |
void |
clear()
clear all the entries |
boolean |
contains(int key)
Find a value from the set |
boolean |
isEmpty()
is the set empty |
IteratorInt |
iterator()
get an iterator to go through the set |
boolean |
remove(int key)
Remove a value from the set |
int |
size()
get the number of used entries |
int[] |
toArray()
convert to an array |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SetInt()
public SetInt(int initialCapacity)
initialCapacity
- Method Detail |
---|
public boolean add(int key)
key
- the value to add
public boolean remove(int key)
key
- the value to add
public boolean contains(int key)
key
- the value to find
public int size()
public boolean isEmpty()
public void clear()
public IteratorInt iterator()
public int[] toArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |