|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchord.util.IntArraySet
public class IntArraySet
A resizable, array-backed list of int primitives. Created: Sat Dec 29 14:21:12 2001
| Field Summary | |
|---|---|
protected int[] |
_data
the data of the set |
protected int |
_pos
the index after the last entry in the set |
protected static int |
DEFAULT_CAPACITY
the default capacity for new sets |
| Constructor Summary | |
|---|---|
IntArraySet()
|
|
IntArraySet(int capacity)
|
|
IntArraySet(IntArraySet that)
|
|
| Method Summary | |
|---|---|
boolean |
add(int val)
Adds val to the end of the list, growing as needed. |
boolean |
addAll(IntArraySet that)
|
void |
addForcibly(int val)
|
void |
clear()
|
boolean |
contains(int value)
Searches the set for value |
boolean |
equals(java.lang.Object o)
|
int |
get(int idx)
|
void |
grow()
Double the capacity of the internal array. |
int |
hashCode()
|
boolean |
isEmpty()
Tests whether this list contains any values. |
boolean |
overlaps(IntArraySet c)
|
void |
setReadOnly()
|
int |
size()
Returns the number of values in the list. |
boolean |
subset(IntArraySet that)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int[] _data
protected int _pos
protected static final int DEFAULT_CAPACITY
| Constructor Detail |
|---|
public IntArraySet()
public IntArraySet(int capacity)
public IntArraySet(IntArraySet that)
| Method Detail |
|---|
public void setReadOnly()
public void grow()
public int size()
public boolean isEmpty()
public boolean contains(int value)
value - an int valuepublic int get(int idx)
public void clear()
public boolean add(int val)
val - an int valuepublic void addForcibly(int val)
public boolean addAll(IntArraySet that)
public boolean overlaps(IntArraySet c)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean subset(IntArraySet that)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||