Package net.didion.jwnl.dictionary
Class FileBackedDictionary.FileLookaheadIterator
java.lang.Object
net.didion.jwnl.dictionary.FileBackedDictionary.FileLookaheadIterator
- All Implemented Interfaces:
Iterator
- Direct Known Subclasses:
FileBackedDictionary.IndexFileLookaheadIterator
- Enclosing class:
FileBackedDictionary
private abstract class FileBackedDictionary.FileLookaheadIterator
extends Object
implements Iterator
A lookahead iterator over a dictionary file. Each element in the enumeration
is a line in the enumerated file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private long
protected DictionaryFileType
private boolean
private long
protected POS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected long
getNextOffset
(long currentOffset) final boolean
hasNext()
final Object
next()
protected final void
nextLine()
Read the next line in the iterated file.protected final void
protected abstract Object
void
remove()
This method can be over-ridden to remove the currently pointed-at object from the data source backing the iterator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
_currentLine
-
_currentOffset
private long _currentOffset -
_nextOffset
private long _nextOffset -
_more
private boolean _more -
_pos
-
_fileType
-
-
Constructor Details
-
FileLookaheadIterator
-
-
Method Details
-
parseLine
-
next
-
hasNext
public final boolean hasNext() -
remove
public void remove()This method can be over-ridden to remove the currently pointed-at object from the data source backing the iterator. -
nextLine
protected final void nextLine()Read the next line in the iterated file. -
nextOffset
- Throws:
JWNLException
-
getNextOffset
- Throws:
JWNLException
-