Class ExcludeFieldIndexSelector
java.lang.Object
com.univocity.parsers.common.fields.FieldSet<Integer>
com.univocity.parsers.common.fields.ExcludeFieldIndexSelector
- All Implemented Interfaces:
FieldSelector, Cloneable
A FieldSelector capable of deselecting fields by their position in a record.
This selector stores undesired fields and will return the indexes of those fields that are not part of the selection.
- Author:
- Univocity Software Pty Ltd - parsers@univocity.com
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescribe()Returns a string that represents the current field selectionint[]getFieldIndexes(NormalizedString[] columns) Returns the indexes of any that are part of a sequence of headers but not part of the selection.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
clone
-
Constructor Details
-
ExcludeFieldIndexSelector
public ExcludeFieldIndexSelector()
-
-
Method Details
-
getFieldIndexes
Returns the indexes of any that are part of a sequence of headers but not part of the selection.- Specified by:
getFieldIndexesin interfaceFieldSelector- Parameters:
columns- the sequence of headers that might have some elements selected by this FieldSelector- Returns:
- the positions of all elements which were not selected.
-
describe
-
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.
-