Class FieldEnumSelector
java.lang.Object
com.univocity.parsers.common.fields.FieldSet<Enum>
com.univocity.parsers.common.fields.FieldEnumSelector
- All Implemented Interfaces:
FieldSelector, Cloneable
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 - parsers@univocity.com
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones this field selector.intgetFieldIndex(Enum column) Returns the position of a given column represented by an enumeration value.int[]getFieldIndexes(NormalizedString[] headers) Returns the indexes of any selected fields that are part of a sequence of headers.int[]getFieldIndexes(String[] headers) Returns the indexes of any selected fields that are part of a sequence of headers.Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FieldSelector
describe
-
Constructor Details
-
FieldEnumSelector
public FieldEnumSelector()
-
-
Method Details
-
getFieldIndex
Returns the position of a given column represented by an enumeration value.- Parameters:
column- the column whose position will be returned- Returns:
- the position of the given column.
-
getFieldIndexes
Description copied from interface:FieldSelectorReturns the indexes of any selected fields that are part of a sequence of headers.- Specified by:
getFieldIndexesin interfaceFieldSelector- Parameters:
headers- the sequence of headers that might have some elements selected by this FieldSelector- Returns:
- the positions of all selected elements in the given headers sequence.
-
clone
Description copied from interface:FieldSelectorClones this field selector. Changes to the selection on the clone won't be reflected on the original- Specified by:
clonein interfaceFieldSelector- Overrides:
clonein classFieldSet<Enum>- Returns:
- a copy of the current field selector.
-
getFieldIndexes
Description copied from interface:FieldSelectorReturns the indexes of any selected fields that are part of a sequence of headers.- Specified by:
getFieldIndexesin interfaceFieldSelector- Parameters:
headers- the sequence of headers that might have some elements selected by this FieldSelector- Returns:
- the positions of all selected elements in the given headers sequence.
-