Class EnumFieldReader<K extends FieldEnum<V>,V>

  extended by net.sf.jmatchparser.util.csv.fieldreader.FieldReader<K,V>
      extended by net.sf.jmatchparser.util.csv.fieldreader.EnumFieldReader<K,V>

public class EnumFieldReader<K extends FieldEnum<V>,V>
extends FieldReader<K,V>

A FieldReader that uses an Enum that implements FieldEnum as its field type.

Constructor Summary
EnumFieldReader(K[] enumValues, AbstractCSVReader reader)
          Create a new EnumFieldReader
Method Summary
 void computeFieldSourcesFromIndex(FieldSource.EmptyAction emptyAction)
          Compute the field sources from the index of the enum value inside the declaration.
Methods inherited from class net.sf.jmatchparser.util.csv.fieldreader.FieldReader
close, computeFieldSourcesFromIndex, computeFieldSourcesFromName, computeFieldSourcesFromName, postprocessNewRecord, read, readHeader, setEmptyFieldValue, setFieldSources
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public EnumFieldReader(K[] enumValues,
                       AbstractCSVReader reader)
Create a new EnumFieldReader

enumValues - Values of the enum to be used, usually obtained from Enum.values()
reader - CSV reader to be used
Method Detail


public void computeFieldSourcesFromIndex(FieldSource.EmptyAction emptyAction)
Compute the field sources from the index of the enum value inside the declaration. To be used when header parsing is disabled.

emptyAction - FieldSource.EmptyAction to use

Copyright © 2011. All Rights Reserved.