Track object returned by nextElement upon end of stream; Return it later when they ask for LT passed end of input.
index of next element to fill
How deep have we gone?
If this tree (root) was created from a token stream, track it.
Size of entire stream is unknown; we only know buffer size from FastQueue
Make sure we have at least one element to remove, even if EOF
add n elements to buffer
Return element {@code i} elements ahead of current element. {@code i==0} gets current element. This is not an absolute index into {@link #data} since {@code p} defines the start of the real list.
Returns an element containing position information. If {@code allowApproximateLocation} is {@code false}, then this method will return the {@code LT(1)} element if it contains position information, and otherwise return {@code null}. If {@code allowApproximateLocation} is {@code true}, then this method will return the last known element containing position information.
Seek back to previous index saved during last push() call. Return top of stack (return index).
Make stream jump to a new location, saving old location. Switch back with pop().
Seek to a 0-indexed absolute token index. Normally used to seek backwards in the buffer. Does not force loading of nodes. To preserve backward compatibility, this method allows seeking past the end of the currently buffered data. In this case, the input pointer will be moved but the data will only actually be loaded upon the next call to {@link #consume} or {@link #LT} for {@code k>0}.
Make sure we have 'need' elements from current position p. Last valid p index is data.size()-1. p+need-1 is the data index 'need' elements ahead. If we need 1 element, (p+1-1)==p must be < data.size().
Return string of current buffer contents; non-destructive
For debugging; destructive: moves tree iterator to end.
Generated using TypeDoc
dynamically-sized buffer of elements