LookaheadStream
public class FastQueue<T> extends Object
Modifier and Type | Field | Description |
---|---|---|
protected List<T> |
data |
dynamically-sized buffer of elements
|
protected int |
p |
index of next element to fill
|
protected int |
range |
Constructor | Description |
---|---|
FastQueue() |
Modifier and Type | Method | Description |
---|---|---|
void |
add(T o) |
|
void |
clear() |
|
T |
elementAt(int i) |
Return element
i elements ahead of current element. |
T |
head() |
|
int |
range() |
|
T |
remove() |
Get and remove first element in queue
|
void |
reset() |
|
int |
size() |
|
String |
toString() |
Return string of current buffer contents; non-destructive
|
public void reset()
public void clear()
public T remove()
public void add(T o)
public int size()
public int range()
public T head()
public T elementAt(int i)
i
elements ahead of current element. i==0
gets current element. This is not an absolute index into data
since p
defines the start of the real list.Copyright © 1992–2018 ANTLR. All rights reserved.