class TokenQueue
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
nbrEntries
number of tokens in the queue
|
Constructor and Description |
---|
TokenQueue(int minSize) |
Modifier and Type | Method and Description |
---|---|
void |
append(Token tok)
Add token to end of the queue
|
Token |
elementAt(int idx)
Fetch a token from the queue by index
|
void |
removeFirst()
Remove token from front of queue
|
void |
reset()
Clear the queue.
|
public final void append(Token tok)
tok
- The token to addpublic final Token elementAt(int idx)
idx
- The index of the token to fetch, where zero is the token at the front of the queuepublic final void reset()
public final void removeFirst()