public class BasicLineIterator extends Object implements SentenceIterator, Iterable<String>
| Constructor and Description |
|---|
BasicLineIterator(File file) |
BasicLineIterator(InputStream stream) |
BasicLineIterator(String filePath) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
void |
finish()
Allows for any finishing (closing of input streams or the like)
|
SentencePreProcessor |
getPreProcessor() |
boolean |
hasNext()
Same idea as
Iterator |
Iterator<String> |
iterator()
Implentation for Iterable interface.
|
String |
nextSentence()
Gets the next sentence or null
if there's nothing left (Do yourself a favor and
check hasNext() )
|
void |
reset()
Resets the iterator to the beginning
|
void |
setPreProcessor(SentencePreProcessor preProcessor) |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic BasicLineIterator(@NonNull
File file)
throws FileNotFoundException
FileNotFoundExceptionpublic BasicLineIterator(@NonNull
InputStream stream)
public BasicLineIterator(@NonNull
String filePath)
throws FileNotFoundException
FileNotFoundExceptionpublic String nextSentence()
SentenceIteratornextSentence in interface SentenceIteratorpublic boolean hasNext()
SentenceIteratorIteratorhasNext in interface SentenceIteratorpublic void reset()
SentenceIteratorreset in interface SentenceIteratorpublic void finish()
SentenceIteratorfinish in interface SentenceIteratorpublic SentencePreProcessor getPreProcessor()
getPreProcessor in interface SentenceIteratorpublic void setPreProcessor(SentencePreProcessor preProcessor)
setPreProcessor in interface SentenceIteratorprotected void finalize()
throws Throwable
Copyright © 2018. All rights reserved.