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

public Class FieldEnumSelector

extends FieldSet<Enum<E extends Enum<E>>>
implements FieldSelector
Class Inheritance
All Implemented Interfaces
com.univocity.parsers.common.fields.FieldSelector, java.lang.Cloneable
Annotations
@SuppressWarnings:rawtypes
Imports
com.univocity.parsers.common.*

A FieldSelector capable of selecting fields represented by values of an enumeration type. The toString() output of the enumeration value will be used to match name of the fields.
Author
Univocity Software Pty Ltd - [email protected]
See Also
FieldSelector, FieldSet

Field Summary

Modifier and TypeField and Description
private FieldNameSelector

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FieldEnumSelector
public int

Returns:

the position of the given column.
getFieldIndex
(Enum<E extends Enum<E>>
the column whose position will be returned
column
)

Returns the position of a given column represented by an enumeration value.

public int[]
getFieldIndexes(NormalizedString[]
the sequence of headers that might have some elements selected by this FieldSelector
headers
)

Implements com.univocity.parsers.common.fields.FieldSelector.getFieldIndexes.

Returns the indexes of any selected fields that are part of a sequence of headers.
public int[]
getFieldIndexes(String[]
the sequence of headers that might have some elements selected by this FieldSelector
headers
)

Implements com.univocity.parsers.common.fields.FieldSelector.getFieldIndexes.

Returns the indexes of any selected fields that are part of a sequence of headers.
Inherited from com.univocity.parsers.common.fields.FieldSet:
addadddescribegetremoveremovesetsettoString

Field Detail

namesback to summary
private FieldNameSelector names

Constructor Detail

FieldEnumSelectorback to summary
public FieldEnumSelector()

Method Detail

cloneback to summary
public FieldEnumSelector clone()

Overrides com.univocity.parsers.common.fields.FieldSet.clone.

Implements com.univocity.parsers.common.fields.FieldSelector.clone.

Doc from com.univocity.parsers.common.fields.FieldSelector.clone.

Clones this field selector. Changes to the selection on the clone won't be reflected on the original

Returns:FieldEnumSelector

a copy of the current field selector.

getFieldIndexback to summary
public int getFieldIndex(Enum<E extends Enum<E>> column)

Returns the position of a given column represented by an enumeration value.

Parameters
column:Enum<E extends Enum<E>>

the column whose position will be returned

Returns:int

the position of the given column.

getFieldIndexesback to summary
public int[] getFieldIndexes(NormalizedString[] headers)

Implements com.univocity.parsers.common.fields.FieldSelector.getFieldIndexes.

Doc from com.univocity.parsers.common.fields.FieldSelector.getFieldIndexes.

Returns the indexes of any selected fields that are part of a sequence of headers.

Parameters
headers:NormalizedString[]

the sequence of headers that might have some elements selected by this FieldSelector

Returns:int[]

the positions of all selected elements in the given headers sequence.

Annotations
@Override
getFieldIndexesback to summary
public int[] getFieldIndexes(String[] headers)

Implements com.univocity.parsers.common.fields.FieldSelector.getFieldIndexes.

Doc from com.univocity.parsers.common.fields.FieldSelector.getFieldIndexes.

Returns the indexes of any selected fields that are part of a sequence of headers.

Parameters
headers:String[]

the sequence of headers that might have some elements selected by this FieldSelector

Returns:int[]

the positions of all selected elements in the given headers sequence.

Annotations
@Override