protected abstract class WordnetFile.LineIterator extends Object implements Iterator<String>
UnsupportedOperationException.| Modifier and Type | Field and Description |
|---|---|
protected ByteBuffer |
itrBuffer |
protected String |
next |
protected ByteBuffer |
parentBuffer |
| Constructor and Description |
|---|
LineIterator(ByteBuffer buffer,
String key)
Constructs a new line iterator over this buffer, starting at the
specified key.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
advance()
Skips over comment lines to find the next line that would be returned
by the iterator in a call to
next(). |
protected abstract void |
findFirstLine(String key)
Advances the iterator the first line the iterator should return,
based on the specified key.
|
String |
getNextLine()
Returns the line currently stored as the 'next' line, if any.
|
boolean |
hasNext() |
protected boolean |
isComment(String line)
Returns
true if the specified line is a comment;
false otherwise |
String |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected final ByteBuffer parentBuffer
protected ByteBuffer itrBuffer
protected String next
public LineIterator(ByteBuffer buffer, String key)
buffer - the buffer over which the iterator should iterator; may
not be nullkey - the key of the line to start at; may be nullNullPointerException - if the specified buffer is nullpublic String getNextLine()
null if noneprotected abstract void findFirstLine(String key)
key - the key indexed the first line to be returned by the
iteratorprotected void advance()
next().protected boolean isComment(String line)
true if the specified line is a comment;
false otherwiseline - the line to be testedtrue if the specified line is a comment;
false otherwiseCopyright © 2018. All rights reserved.