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
A snapshot of a
Context which retains copies of variable attributes of a given Context to
store the state of the parsing process at a given point in time. All runtime operations such as ContextWrapper.stop()
will still work and affect the current parsing process.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final longFields inherited from class com.univocity.parsers.common.ContextWrapper
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the column index of the record being processed.longReturns the index of the last valid record parsed from the inputMethods inherited from class com.univocity.parsers.common.ContextWrapper
columnsReordered, errorContentLength, extractedFieldIndexes, headers, indexOf, indexOf, isStopped, recordMetaData, selectedHeaders, stop, toRecord
-
Field Details
-
currentColumn
private final int currentColumn -
currentRecord
private final long currentRecord
-
-
Constructor Details
-
ContextSnapshot
Creates a snapshot of a givenContext- Parameters:
context- the context object whose variable attributes will be copied over.
-
-
Method Details
-
currentColumn
public int currentColumn()Description copied from interface:ContextReturns the column index of the record being processed.- Specified by:
currentColumnin interfaceContext- Overrides:
currentColumnin classContextWrapper<T extends Context>- Returns:
- the column index of the record being processed.
-
currentRecord
public long currentRecord()Description copied from interface:ContextReturns the index of the last valid record parsed from the input- Specified by:
currentRecordin interfaceContext- Overrides:
currentRecordin classContextWrapper<T extends Context>- Returns:
- the index of the last valid record parsed from the input
-