public class TokenStream extends Object
| Constructor and Description |
|---|
TokenStream()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit(int k)
Advances the base of the stream.
|
long |
get(int k)
Get the kth token descriptor from the stream.
|
void |
grow()
Grow the buffer to accommodate more token descriptors.
|
boolean |
isEmpty()
Test to see if stream is empty.
|
boolean |
isFull()
Test to see if stream is full.
|
int |
last()
Get the index of the last token in the stream.
|
void |
put(long token)
Put a token descriptor to the stream.
|
public boolean isEmpty()
public boolean isFull()
public int last()
public void put(long token)
token - Token descriptor to add.public long get(int k)
k - indexpublic void commit(int k)
k - Position of token to be the new base.public void grow()