com.univocity.parsers.common.fields
Class FieldIndexSelector

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

public class FieldIndexSelector
extends FieldSet<Integer>
implements FieldSelector

A FieldSelector capable of selecting fields by their position in a record.

Author:
uniVocity Software Pty Ltd - parsers@univocity.com
See Also:
FieldSelector, FieldSet

Constructor Summary
FieldIndexSelector()
           
 
Method Summary
 int[] getFieldIndexes(String[] columns)
          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, describe, get, remove, remove, set, set, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.univocity.parsers.common.fields.FieldSelector
describe
 

Constructor Detail

FieldIndexSelector

public FieldIndexSelector()
Method Detail

getFieldIndexes

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


Copyright © 2017 uniVocity Software Pty Ltd. All rights reserved.