public class BasicLineIterator extends Object implements SentenceIterator, Iterable<String>
Constructor and Description |
---|
BasicLineIterator(@NonNull File file) |
BasicLineIterator(@NonNull InputStream stream) |
BasicLineIterator(@NonNull 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, wait
forEach, spliterator
public BasicLineIterator(@NonNull @NonNull File file) throws FileNotFoundException
FileNotFoundException
public BasicLineIterator(@NonNull @NonNull InputStream stream)
public BasicLineIterator(@NonNull @NonNull String filePath) throws FileNotFoundException
FileNotFoundException
public String nextSentence()
SentenceIterator
nextSentence
in interface SentenceIterator
public boolean hasNext()
SentenceIterator
Iterator
hasNext
in interface SentenceIterator
public void reset()
SentenceIterator
reset
in interface SentenceIterator
public void finish()
SentenceIterator
finish
in interface SentenceIterator
public SentencePreProcessor getPreProcessor()
getPreProcessor
in interface SentenceIterator
public void setPreProcessor(SentencePreProcessor preProcessor)
setPreProcessor
in interface SentenceIterator
protected void finalize() throws Throwable
Copyright © 2021. All rights reserved.