private abstract class FileBackedDictionary.FileLookaheadIterator
extends java.lang.Object
implements java.util.Iterator
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
_currentLine |
private long |
_currentOffset |
protected DictionaryFileType |
_fileType |
private boolean |
_more |
private long |
_nextOffset |
protected POS |
_pos |
| Constructor and Description |
|---|
FileLookaheadIterator(POS pos,
DictionaryFileType fileType) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
getNextOffset(long currentOffset) |
boolean |
hasNext() |
java.lang.Object |
next() |
protected void |
nextLine()
Read the next line in the iterated file.
|
protected void |
nextOffset() |
protected abstract java.lang.Object |
parseLine(POS pos,
long offset,
java.lang.String line) |
void |
remove()
This method can be over-ridden to remove the currently pointed-at object
from the data source backing the iterator.
|
private java.lang.String _currentLine
private long _currentOffset
private long _nextOffset
private boolean _more
protected POS _pos
protected DictionaryFileType _fileType
public FileLookaheadIterator(POS pos, DictionaryFileType fileType)
protected abstract java.lang.Object parseLine(POS pos, long offset, java.lang.String line)
public final java.lang.Object next()
next in interface java.util.Iteratorpublic final boolean hasNext()
hasNext in interface java.util.Iteratorpublic void remove()
remove in interface java.util.Iteratorprotected final void nextLine()
protected final void nextOffset()
throws JWNLException
JWNLExceptionprotected long getNextOffset(long currentOffset)
throws JWNLException
JWNLException