Top Description Fields Constructors Methods
com.univocity.parsers.common

public Class ColumnMap

extends Object
Class Inheritance
Imports
com.univocity.parsers.common.fields.*, java.util.*

Class responsible for calculating and storing the position of fields parsed from the input.
Author
Univocity Software Pty Ltd - [email protected]

Field Summary

Modifier and TypeField and Description
private Map<NormalizedString, Integer>
private final Context
private int[]
private int[]
private final ParserOutput

Constructor Summary

AccessConstructor and Description
public
ColumnMap(Context context, ParserOutput output)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the position of the given header, or -1 if it could not be found.
indexOf
(String
the header whose position will be returned
header
)

Returns the position of a header (0 based).

public int

Returns:

the position of the given header, or -1 if it could not be found.
indexOf
(Enum<?>
the header whose position will be returned
header
)

Returns the position of a header (0 based).

pack-priv void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnMapback to summary
private Map<NormalizedString, Integer> columnMap
contextback to summary
private final Context context
enumMapback to summary
private int[] enumMap
extractedIndexesback to summary
private int[] extractedIndexes
outputback to summary
private final ParserOutput output

Constructor Detail

ColumnMapback to summary
public ColumnMap(Context context, ParserOutput output)

Method Detail

indexOfback to summary
public int indexOf(String header)

Returns the position of a header (0 based).

Parameters
header:String

the header whose position will be returned

Returns:int

the position of the given header, or -1 if it could not be found.

indexOfback to summary
public int indexOf(Enum<?> header)

Returns the position of a header (0 based).

Parameters
header:Enum<?>

the header whose position will be returned

Returns:int

the position of the given header, or -1 if it could not be found.

resetback to summary
pack-priv void reset()
validateHeaderback to summary
private void validateHeader(Object header)