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 Details

    • _currentLine

      private String _currentLine
    • _currentOffset

      private long _currentOffset
    • _nextOffset

      private long _nextOffset
    • _more

      private boolean _more
    • _pos

      protected POS _pos
    • _fileType

      protected DictionaryFileType _fileType
  • Constructor Details

  • Method Details

    • parseLine

      protected abstract Object parseLine(POS pos, long offset, String line)
    • next

      public final Object next()
      Specified by:
      next in interface Iterator
    • hasNext

      public final boolean hasNext()
      Specified by:
      hasNext in interface Iterator
    • remove

      public void remove()
      This method can be over-ridden to remove the currently pointed-at object from the data source backing the iterator.
      Specified by:
      remove in interface Iterator
    • nextLine

      protected final void nextLine()
      Read the next line in the iterated file.
    • nextOffset

      protected final void nextOffset() throws JWNLException
      Throws:
      JWNLException
    • getNextOffset

      protected long getNextOffset(long currentOffset) throws JWNLException
      Throws:
      JWNLException