Package com.univocity.parsers.common
Class ColumnMap
- java.lang.Object
-
- com.univocity.parsers.common.ColumnMap
-
public class ColumnMap extends java.lang.Object
Class responsible for calculating and storing the position of fields parsed from the input.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<NormalizedString,java.lang.Integer>
columnMap
private Context
context
private int[]
enumMap
private int[]
extractedIndexes
private ParserOutput
output
-
Constructor Summary
Constructors Constructor Description ColumnMap(Context context, ParserOutput output)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
indexOf(java.lang.Enum<?> header)
Returns the position of a header (0 based).int
indexOf(java.lang.String header)
Returns the position of a header (0 based).(package private) void
reset()
private void
validateHeader(java.lang.Object header)
-
-
-
Field Detail
-
columnMap
private java.util.Map<NormalizedString,java.lang.Integer> columnMap
-
enumMap
private int[] enumMap
-
extractedIndexes
private int[] extractedIndexes
-
context
private final Context context
-
output
private final ParserOutput output
-
-
Constructor Detail
-
ColumnMap
public ColumnMap(Context context, ParserOutput output)
-
-
Method Detail
-
indexOf
public int indexOf(java.lang.String header)
Returns the position of a header (0 based).- Parameters:
header
- the header whose position will be returned- Returns:
- the position of the given header, or -1 if it could not be found.
-
validateHeader
private void validateHeader(java.lang.Object header)
-
indexOf
public int indexOf(java.lang.Enum<?> header)
Returns the position of a header (0 based).- Parameters:
header
- the header whose position will be returned- Returns:
- the position of the given header, or -1 if it could not be found.
-
reset
void reset()
-
-