Class FieldNameSelector
java.lang.Object
com.univocity.parsers.common.fields.FieldSet<String>
com.univocity.parsers.common.fields.FieldNameSelector
- All Implemented Interfaces:
FieldSelector, Cloneable
A FieldSelector capable of selecting fields by their name.
- Author:
- Univocity Software Pty Ltd - parsers@univocity.com
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetFieldIndex(String header) Returns the position of a given headerint[]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 FieldSet
add, add, clone, describe, get, remove, remove, set, set, toStringMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FieldSelector
clone, describe
-
Constructor Details
-
FieldNameSelector
public FieldNameSelector()
-
-
Method Details
-
getFieldIndex
Returns the position of a given header- Parameters:
header- the header whose position will be returned- Returns:
- the position of the given header.
-
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.
-
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.
-