edu.mit.jwi
Class DataSourceDictionary.FileIterator<T,N>
java.lang.Object
edu.mit.jwi.DataSourceDictionary.FileIterator<T,N>
- All Implemented Interfaces:
- IHasPOS, Iterator<N>
- Direct Known Subclasses:
- DataSourceDictionary.ExceptionFileIterator, DataSourceDictionary.FileIterator2
- Enclosing class:
- DataSourceDictionary
public abstract class DataSourceDictionary.FileIterator<T,N>
- extends Object
- implements Iterator<N>, IHasPOS
Abstract class used for iterating over line-based files.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fFile
protected final IDataSource<T> fFile
iterator
protected final Iterator<String> iterator
fParser
protected final ILineParser<T> fParser
currentLine
protected String currentLine
DataSourceDictionary.FileIterator
public DataSourceDictionary.FileIterator(IContentType<T> content)
DataSourceDictionary.FileIterator
public DataSourceDictionary.FileIterator(IContentType<T> content,
String startKey)
getCurrentLine
public String getCurrentLine()
- Returns the current line.
- Returns:
- the current line
- Since:
- JWI 2.2.0
getPOS
public POS getPOS()
- Description copied from interface:
IHasPOS
- Returns the associated part of speech for this object. If this object is
not associated with any particular part of speech, this method may return
null.
- Specified by:
getPOS in interface IHasPOS
- Returns:
- The associated part of speech, or
null if none.
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<N>
next
public N next()
- Specified by:
next in interface Iterator<N>
remove
public void remove()
- Specified by:
remove in interface Iterator<N>
parseLine
public abstract N parseLine(String line)
- Parses the line using a parser provided at construction time
Copyright © 2011. All Rights Reserved.