Class ExcludeFieldEnumSelector
- java.lang.Object
-
- com.univocity.parsers.common.fields.FieldSet<java.lang.Enum>
-
- com.univocity.parsers.common.fields.ExcludeFieldEnumSelector
-
- All Implemented Interfaces:
FieldSelector
,java.lang.Cloneable
public class ExcludeFieldEnumSelector extends FieldSet<java.lang.Enum> implements FieldSelector
A FieldSelector capable of deselecting fields in a record.This selector stores undesired fields, represented by values of an enumeration, and will return the indexes of those fields that are not part of the selection.
- See Also:
FieldSelector
,FieldSet
-
-
Field Summary
Fields Modifier and Type Field Description private ExcludeFieldNameSelector
names
-
Constructor Summary
Constructors Constructor Description ExcludeFieldEnumSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExcludeFieldEnumSelector
clone()
Clones this field selector.java.lang.String
describe()
Returns a string that represents the current field selectionint[]
getFieldIndexes(NormalizedString[] headers)
Returns the indexes of any that are part of a sequence of headers but not part of the selection.int[]
getFieldIndexes(java.lang.String[] headers)
Returns the indexes of any selected fields that are part of a sequence of headers.
-
-
-
Field Detail
-
names
private ExcludeFieldNameSelector names
-
-
Method Detail
-
getFieldIndexes
public int[] getFieldIndexes(NormalizedString[] headers)
Returns the indexes of any that are part of a sequence of headers but not part of the selection.- Specified by:
getFieldIndexes
in interfaceFieldSelector
- Parameters:
headers
- the sequence of headers that might have some elements selected by this FieldSelector- Returns:
- the positions of all elements which were not selected.
-
describe
public java.lang.String describe()
Description copied from class:FieldSet
Returns a string that represents the current field selection- Specified by:
describe
in interfaceFieldSelector
- Overrides:
describe
in classFieldSet<java.lang.Enum>
- Returns:
- a string that represents the current field selection
-
clone
public ExcludeFieldEnumSelector clone()
Description copied from interface:FieldSelector
Clones this field selector. Changes to the selection on the clone won't be reflected on the original- Specified by:
clone
in interfaceFieldSelector
- Overrides:
clone
in classFieldSet<java.lang.Enum>
- Returns:
- a copy of the current field selector.
-
getFieldIndexes
public int[] getFieldIndexes(java.lang.String[] headers)
Description copied from interface:FieldSelector
Returns the indexes of any selected fields that are part of a sequence of headers.- Specified by:
getFieldIndexes
in 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.
-
-