com.univocity.parsers.common.iterators
Class RowIterator
java.lang.Object
com.univocity.parsers.common.iterators.RowIterator
- All Implemented Interfaces:
- IterableResult<String[],ParsingContext>, Iterable<String[]>
public abstract class RowIterator
- extends Object
An iterator of String[]. Created when AbstractParser.iterate(File)
(and its overloaded counterparts) is called
- Author:
- uniVocity Software Pty Ltd - dev@univocity.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parser
protected final AbstractParser parser
RowIterator
public RowIterator(AbstractParser parser)
nextResult
protected final String[] nextResult()
- Returns the next record (either a String[] or a
Record)
- Returns:
- the next record if available.
getContext
public final ParsingContext getContext()
- Description copied from interface:
IterableResult
- Returns the current parsing
Context, if available
- Specified by:
getContext in interface IterableResult<T,ParsingContext>
- Returns:
- the contextual object with information about an ongoing parsing process
beginParsing
protected abstract void beginParsing()
- This method is called whenever the
iterator is starting to iterate over the
results.
an example implementation of this is:
@Override
public void beginParsing(){
parser.beginParsing(input);
}
This is to allow for different input types such as Reader, File, or InputStream without large code
reuse.
iterator
public final ResultIterator<T,ParsingContext> iterator()
- Specified by:
iterator in interface IterableResult<T,ParsingContext>- Specified by:
iterator in interface Iterable<T>
Copyright © 2017 uniVocity Software Pty Ltd. All rights reserved.