|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.translet.processor.TokenIteratorImpl
Iterator across a specified range of the tokens generated from the xpath expressions.
Constructor Summary | |
TokenIteratorImpl(Object[] tokens,
int offset,
int length)
|
Method Summary | |
TokenIterator |
createSnapshot()
Creates a snapshot since the time markForSnapshot was called including all the elements that was gotten using next(). |
boolean |
hasNext()
Moves the current token cursor to the next token |
boolean |
hasPrevious()
Check if previous will return valid token. |
void |
markForSnapshot()
Marks the position to start recoding. |
String |
next()
Returns the value of the token. |
boolean |
nextTokenIs(char c)
Returns true if the next token is the char specified. |
String |
peekNext()
Peeks the next token w/o incrementing cursor. |
String |
previous()
Returns the previous element in the list. |
void |
rewind()
Re-initializes the iterator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TokenIteratorImpl(Object[] tokens, int offset, int length)
offset
- The offset using a zero based array.length
- Number of tokens to be processed.Method Detail |
public boolean hasNext()
hasNext
in interface TokenIterator
public boolean nextTokenIs(char c)
nextTokenIs
in interface TokenIterator
public String peekNext()
TokenIterator
peekNext
in interface TokenIterator
org.translet.processor.TokenIterator
NoSuchElementException
- - if the iteration has
no previous element.public String next()
TokenIterator
next
in interface TokenIterator
public String previous()
TokenIterator
previous
in interface TokenIterator
org.translet.processor.TokenIterator
NoSuchElementException
- - if the iteration has
no previous element.public void markForSnapshot()
TokenIterator
markForSnapshot
in interface TokenIterator
public TokenIterator createSnapshot()
TokenIterator
createSnapshot
in interface TokenIterator
public boolean hasPrevious()
TokenIterator
hasPrevious
in interface TokenIterator
public void rewind()
TokenIterator
rewind
in interface TokenIterator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |