public class IDList
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
newLen
The number of valid elements in the new list.
|
int[] |
newList
Indices belonging to the "new list".
|
int |
oldLen
The number of valid elements in the old list.
|
int[] |
oldList
Indices belonging to the "old list".
|
Constructor and Description |
---|
IDList() |
Modifier and Type | Method and Description |
---|---|
void |
copyNewToOld()
Copies the new list to the old list, and clears the new list.
|
boolean |
moveToNew(int idx)
Adds an index to the new list.
|
void |
print()
Prints the contents of the lists.
|
void |
reset()
Resets all states to zero.
|
public int[] newList
public int[] oldList
public int newLen
public int oldLen
public void reset()
public boolean moveToNew(int idx)
idx
- The index to movepublic void copyNewToOld()
public void print()