|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.util.IntSet
public final class IntSet
The IntSet
class is an unsynchronized set of integers.
The main operations are add, remove, size, and getInts.
Field Summary | |
---|---|
protected int |
elementCount
The number of valid components in the vector. |
protected int[] |
elementData
The array buffer into which the components of the vector are stored. |
Constructor Summary | |
---|---|
IntSet()
Constructs an empty vector. |
|
IntSet(int initialCapacity)
Constructs an empty vector with the specified initial capacity and capacity increment. |
Method Summary | |
---|---|
void |
add(int val)
Adds the specified int to this set,, increasing its size by one. |
boolean |
contains(int elem)
Tests if the specified object is a component in this vector. |
int[] |
getElements()
Returns the underlying int array. |
boolean |
remove(int val)
Removes the first occurrence of the argument from this set. |
void |
removeAll()
Removes all components from this vector and sets its size to zero. |
int |
size()
Returns the number of components in this set. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int[] elementData
protected int elementCount
Constructor Detail |
---|
public IntSet(int initialCapacity)
initialCapacity
- the initial capacity of the vector.
IllegalArgumentException
- if the specified initial capacity
is negativepublic IntSet()
Method Detail |
---|
public int[] getElements()
public final int size()
public final boolean contains(int elem)
elem
- an object.
true
if the specified object is a component in
this vector; false
otherwise.public void add(int val)
val
- the component to be added.public boolean remove(int val)
val
- the component to be removed.
true
if the argument was a component of this
set; false
otherwise.public void removeAll()
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |