public class BlockWorkList extends Object
Modifier and Type | Field and Description |
---|---|
(package private) AbstractMergeNode[] |
workList |
(package private) int |
workListIndex |
(package private) int[] |
workListNumbers |
Constructor and Description |
---|
BlockWorkList() |
Modifier and Type | Method and Description |
---|---|
void |
add(AbstractMergeNode block)
Adds a block to this list in an unsorted fashion, like a stack.
|
void |
addSorted(AbstractMergeNode block,
int number)
Adds a block to this list, sorted by the supplied number.
|
private void |
allocate() |
private void |
grow() |
boolean |
isEmpty()
Checks whether the list is empty.
|
AbstractMergeNode |
removeFromWorkList()
Removes the next block from this work list.
|
AbstractMergeNode[] workList
int[] workListNumbers
int workListIndex
public BlockWorkList()
public void add(AbstractMergeNode block)
block
- the block to addpublic void addSorted(AbstractMergeNode block, int number)
block
- the block to addnumber
- the number used to sort the blockpublic AbstractMergeNode removeFromWorkList()
public boolean isEmpty()
true
if this list is emptyprivate void allocate()
private void grow()