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 Stringprivate longprotected DictionaryFileTypeprivate booleanprivate longprotected POS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longgetNextOffset(long currentOffset) final booleanhasNext()final Objectnext()protected final voidnextLine()Read the next line in the iterated file.protected final voidprotected abstract Objectvoidremove()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, waitMethods 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
-