Package com.univocity.parsers.common
Class ContextSnapshot<T extends Context>
- java.lang.Object
-
- com.univocity.parsers.common.ContextWrapper<T>
-
- com.univocity.parsers.common.ContextSnapshot<T>
-
- All Implemented Interfaces:
Context
public abstract class ContextSnapshot<T extends Context> extends ContextWrapper<T>
A snapshot of aContext
which retains copies of variable attributes of a givenContext
to store the state of the parsing process at a given point in time. All runtime operations such asContextWrapper.stop()
will still work and affect the current parsing process.
-
-
Field Summary
Fields Modifier and Type Field Description private int
currentColumn
private long
currentRecord
-
Fields inherited from class com.univocity.parsers.common.ContextWrapper
context
-
-
Constructor Summary
Constructors Constructor Description ContextSnapshot(T context)
Creates a snapshot of a givenContext
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
currentColumn()
Returns the column index of the record being processed.long
currentRecord()
Returns the index of the last valid record parsed from the input-
Methods inherited from class com.univocity.parsers.common.ContextWrapper
columnsReordered, errorContentLength, extractedFieldIndexes, headers, indexOf, indexOf, isStopped, recordMetaData, selectedHeaders, stop, toRecord
-
-
-
-
Method Detail
-
currentColumn
public int currentColumn()
Description copied from interface:Context
Returns the column index of the record being processed.- Specified by:
currentColumn
in interfaceContext
- Overrides:
currentColumn
in classContextWrapper<T extends Context>
- Returns:
- the column index of the record being processed.
-
currentRecord
public long currentRecord()
Description copied from interface:Context
Returns the index of the last valid record parsed from the input- Specified by:
currentRecord
in interfaceContext
- Overrides:
currentRecord
in classContextWrapper<T extends Context>
- Returns:
- the index of the last valid record parsed from the input
-
-