Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.mindprod.csv
Enum CSVReadState

    java.lang.Object
      java.lang.Enum<CSVReadState>
          com.mindprod.csv.CSVReadState

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<CSVReadState>

    public enum CSVReadState

extends java.lang.Enum<CSVReadState>

enumeration of the finite state automaton used to read CSV files.

We don't put more logic here since enums are static, and we need separate state for separate CSVReaders.

Since:
  2009-03-25
Version:
  3.0 2009-06-15 - lookup table to speed CSVReader.
Author:
  Roedy Green, Canadian Mind Products

Enum Constant Summary
`AFTER_END_QUOTE` parser: We have just hit a quote, might be doubled or might be last one.
`IN_PLAIN` parser: We are in the middle of an ordinary field, possible full of blanks.
`IN_QUOTED` parser: e are in middle of field surrounded in quotes.
`SEEKING_FIELD` parser : we don't yet know if there is another non-comment field on the line.
`SEEKING_START` parser: We are in blanks before a field that we know is there, possibly empty, because we have seen the comma after the previous field.
`SKIPPING_TAIL` parser: We are in blanks after a quoted field looking for the separator

Method Summary
`static CSVReadState` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static CSVReadState[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### AFTER_END_QUOTE

    public static final CSVReadState AFTER_END_QUOTE

  parser: We have just hit a quote, might be doubled or might be last one.

### IN_PLAIN

    public static final CSVReadState IN_PLAIN

  parser: We are in the middle of an ordinary field, possible full of blanks.

### IN_QUOTED

    public static final CSVReadState IN_QUOTED

  parser: e are in middle of field surrounded in quotes.

### SEEKING_FIELD

    public static final CSVReadState SEEKING_FIELD

  parser : we don't yet know if there is another non-comment field on the line. In blanks prior to first field.

### SEEKING_START

    public static final CSVReadState SEEKING_START

  parser: We are in blanks before a field that we know is there, possibly empty, because we have seen the comma after the previous field.

### SKIPPING_TAIL

    public static final CSVReadState SKIPPING_TAIL

  parser: We are in blanks after a quoted field looking for the separator

Method Detail

### values

    public static CSVReadState[] values()

  Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

      for (CSVReadState c : CSVReadState.values())
          System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    public static CSVReadState valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
    `java.lang.NullPointerException` - if the argument is null

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD