Class FieldEnumSelector

  • All Implemented Interfaces:
    FieldSelector

    public class FieldEnumSelector
    extends FieldSet<java.lang.Enum>
    implements FieldSelector
    A FieldSelector capable of selecting fields represented by values of an enumeration type. The toString() output of the enumeration value will be used to match name of the fields.
    Author:
    uniVocity Software Pty Ltd - parsers@univocity.com
    See Also:
    FieldSelector, FieldSet
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getFieldIndex​(java.lang.Enum column)
      Returns the position of a given column represented by an enumeration value.
      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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FieldEnumSelector

        public FieldEnumSelector()
    • Method Detail

      • getFieldIndex

        public int getFieldIndex​(java.lang.Enum column)
        Returns the position of a given column represented by an enumeration value.
        Parameters:
        column - the column whose position will be returned
        Returns:
        the position of the given column.
      • 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 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.