I
- input symbol typepublic class BlockList<I,D> extends BlockListElem<I,D> implements Iterable<DTNode<I,D>>
DTNode
s). The
list is implemented as a singly-linked list, and allows O(1) insertion
and removal of elements.nextBlock
Constructor and Description |
---|
BlockList() |
Modifier and Type | Method and Description |
---|---|
DTNode<I,D> |
chooseBlock()
Retrieves any block from the list.
|
void |
insertBlock(DTNode<I,D> blockRoot)
Inserts a block into the list.
|
boolean |
isEmpty()
Checks whether this list is empty.
|
Iterator<DTNode<I,D>> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public void insertBlock(DTNode<I,D> blockRoot)
blockRoot
- the root node of the block to be insertedpublic DTNode<I,D> chooseBlock()
null
is returned.null
if the list is empty.public boolean isEmpty()
true
if the list is empty, false
otherwiseCopyright © 2015. All rights reserved.