
Public Member Functions | |
| void | reset () |
| void | clear () |
| T | remove () |
| void | add (T o) |
| int | size () |
| int | range () |
| T | head () |
| T | elementAt (int i) |
| String | toString () |
Protected Attributes | |
| List< T > | data = new ArrayList<T>() |
| int | p = 0 |
| int | range = -1 |
List grows until you dequeue last element at end of buffer. Then it resets to start filling at 0 again. If adds/removes are balanced, the buffer will not grow too large.
No iterator stuff as that's not how we'll use it.
Definition at line 44 of file FastQueue.java.
| void org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.reset | ( | ) |
Reimplemented in org.antlr.runtime.misc.org.antlr.runtime.misc.LookaheadStream< T >.
Definition at line 51 of file FastQueue.java.
| void org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.clear | ( | ) |
Definition at line 52 of file FastQueue.java.
| T org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.remove | ( | ) |
Get and remove first element in queue
Reimplemented in org.antlr.runtime.misc.org.antlr.runtime.misc.LookaheadStream< T >.
Definition at line 55 of file FastQueue.java.
| void org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.add | ( | T | o | ) |
Definition at line 66 of file FastQueue.java.
| int org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.size | ( | ) |
Reimplemented in org.antlr.runtime.misc.org.antlr.runtime.misc.LookaheadStream< T >.
Definition at line 68 of file FastQueue.java.
| int org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.range | ( | ) |
Definition at line 70 of file FastQueue.java.
| T org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.head | ( | ) |
Definition at line 72 of file FastQueue.java.
| T org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.elementAt | ( | int | i | ) |
Return element i elements ahead of current element. i==0 gets current element. This is not an absolute index into the data list since p defines the start of the real list.
Definition at line 78 of file FastQueue.java.
| String org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.toString | ( | ) |
Return string of current buffer contents; non-destructive
Definition at line 91 of file FastQueue.java.
List<T> org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.data = new ArrayList<T>() [protected] |
dynamically-sized buffer of elements
Definition at line 46 of file FastQueue.java.
int org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.p = 0 [protected] |
index of next element to fill
Definition at line 48 of file FastQueue.java.
int org.antlr.runtime.misc.org.antlr.runtime.misc.FastQueue< T >.range = -1 [protected] |
Definition at line 49 of file FastQueue.java.
1.5.5