org.eclipse.xtext.ui.editor.syntaxcoloring
Class TokenScanner.RangedReentrantIterator
java.lang.Object
com.google.common.collect.UnmodifiableIterator<ILexerTokenRegion>
org.eclipse.xtext.ui.editor.syntaxcoloring.TokenScanner.RangedReentrantIterator
- All Implemented Interfaces:
- java.util.Iterator<ILexerTokenRegion>
- Enclosing class:
- TokenScanner
protected class TokenScanner.RangedReentrantIterator
- extends com.google.common.collect.UnmodifiableIterator<ILexerTokenRegion>
A reentrant iterator allows to reuse and filter the elements another iterator
and may update its filter criteria continuously.
It is assumed that setRange(IDocument, int, int)
will be called with
ascending order most of the time thus a sorted iterator may be reused and traversed
further after the range has been updated.
Methods inherited from class com.google.common.collect.UnmodifiableIterator |
remove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenScanner.RangedReentrantIterator
protected TokenScanner.RangedReentrantIterator()
hasNext
public boolean hasNext()
next
public ILexerTokenRegion next()
setRange
public void setRange(org.eclipse.jface.text.IDocument document,
int offset,
int length)