IterableResult<Record,ParsingContext>, java.lang.Iterable<Record>public abstract class RecordIterator
extends java.lang.Object
Records. Created when AbstractParser.iterateRecords(File)
(and its overloaded counterparts) is called| Modifier and Type | Field | Description |
|---|---|---|
protected AbstractParser |
parser |
| Constructor | Description |
|---|---|
RecordIterator(AbstractParser parser) |
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract void |
beginParsing() |
This method is called whenever the
iterator is starting to iterate over the
results. |
ParsingContext |
getContext() |
Returns the current parsing
Context, if available |
ResultIterator<T,ParsingContext> |
iterator() |
|
protected Record |
nextResult() |
Returns the next record (either a String[] or a
Record) |
protected final AbstractParser parser
public RecordIterator(AbstractParser parser)
protected final Record nextResult()
Record)public final ParsingContext getContext()
IterableResultContext, if availablegetContext in interface IterableResult<T,ParsingContext>protected abstract void beginParsing()
iterator is starting to iterate over the
results.
an example implementation of this is:
@Override
public void beginParsing(){
parser.beginParsing(input);
}
Reader, File, or InputStream without large code
reuse.public final ResultIterator<T,ParsingContext> iterator()
iterator in interface java.lang.Iterable<T>iterator in interface IterableResult<T,ParsingContext>