Class ExcludeFieldNameSelector
- java.lang.Object
-
- com.univocity.parsers.common.fields.FieldSet<java.lang.String>
-
- com.univocity.parsers.common.fields.ExcludeFieldNameSelector
-
- All Implemented Interfaces:
FieldSelector
,java.lang.Cloneable
public class ExcludeFieldNameSelector extends FieldSet<java.lang.String> implements FieldSelector, java.lang.Cloneable
A FieldSelector capable of deselecting fields by their name in a record.This selector stores undesired fields and will return the indexes of those fields that are not part of the selection.
- See Also:
FieldSelector
,FieldSet
-
-
Constructor Summary
Constructors Constructor Description ExcludeFieldNameSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class com.univocity.parsers.common.fields.FieldSet
add, add, clone, get, remove, remove, set, set, toString
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.univocity.parsers.common.fields.FieldSelector
clone
-
-
-
-
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.String>
- Returns:
- a string that represents the current field selection
-
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.
-
-