Class FieldIndexSelector

java.lang.Object
com.univocity.parsers.common.fields.FieldSet<Integer>
com.univocity.parsers.common.fields.FieldIndexSelector
All Implemented Interfaces:
FieldSelector, Cloneable

public class FieldIndexSelector extends FieldSet<Integer> implements FieldSelector
A FieldSelector capable of selecting fields by their position in a record.
See Also:
  • Constructor Details

    • FieldIndexSelector

      public FieldIndexSelector()
  • Method Details

    • getFieldIndexes

      public int[] getFieldIndexes(NormalizedString[] columns)
      Description copied from interface: FieldSelector
      Returns the indexes of any selected fields that are part of a sequence of headers.
      Specified by:
      getFieldIndexes in interface FieldSelector
      Parameters:
      columns - 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

      public int[] getFieldIndexes(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 interface FieldSelector
      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.