Class RowIterator
java.lang.Object
com.univocity.parsers.common.iterators.RowIterator
- All Implemented Interfaces:
IterableResult<String[],,ParsingContext> Iterable<String[]>
An iterator of
String[]. Created when AbstractParser.iterate(File)
(and its overloaded counterparts) is called- Author:
- Univocity Software Pty Ltd - dev@univocity.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidThis method is called whenever theiteratoris starting to iterate over the results.final ParsingContextReturns the current parsingContext, if availablefinal ResultIterator<String[], ParsingContext> iterator()protected final String[]Returns the next record (either a String[] or a)invalid reference
RecordMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
parser
-
-
Constructor Details
-
RowIterator
-
-
Method Details
-
nextResult
Returns the next record (either a String[] or a)invalid reference
Record- Returns:
- the next record if available.
-
getContext
Description copied from interface:IterableResultReturns the current parsingContext, if available- Specified by:
getContextin interfaceIterableResult<T,ParsingContext> - Returns:
- the contextual object with information about an ongoing parsing process
-
beginParsing
protected abstract void beginParsing()This method is called whenever theiteratoris 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 asReader, File, or InputStreamwithout large code reuse. -
iterator
- Specified by:
iteratorin interfaceIterable<T>- Specified by:
iteratorin interfaceIterableResult<T,ParsingContext>
-