Class RewindableTokenStream
- java.lang.Object
-
- org.apache.manifoldcf.scriptengine.RewindableTokenStream
-
- All Implemented Interfaces:
TokenStream
public class RewindableTokenStream extends java.lang.Object implements TokenStream
Allows a TokenStream to be repeated as long as a sequence start is kept.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
committedSize
protected int
currentIndex
protected java.util.List<Token>
history
protected TokenStream
parent
-
Constructor Summary
Constructors Constructor Description RewindableTokenStream(TokenStream parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Token
peek()
Examine the current token.void
reset()
void
skip()
Skip the current token.
-
-
-
Field Detail
-
parent
protected TokenStream parent
-
history
protected java.util.List<Token> history
-
currentIndex
protected int currentIndex
-
committedSize
protected int committedSize
-
-
Constructor Detail
-
RewindableTokenStream
public RewindableTokenStream(TokenStream parent)
-
-
Method Detail
-
peek
public Token peek() throws ScriptException
Description copied from interface:TokenStream
Examine the current token.- Specified by:
peek
in interfaceTokenStream
- Throws:
ScriptException
-
skip
public void skip()
Description copied from interface:TokenStream
Skip the current token.- Specified by:
skip
in interfaceTokenStream
-
reset
public void reset()
-
-