2.17.2: 2011-06-17

net.sf.basedb.util.parser
Enum FlatFileParser.LineType

java.lang.Object
  extended by java.lang.Enum<FlatFileParser.LineType>
      extended by net.sf.basedb.util.parser.FlatFileParser.LineType
All Implemented Interfaces:
Serializable, Comparable<FlatFileParser.LineType>
Enclosing class:
FlatFileParser

public static enum FlatFileParser.LineType
extends Enum<FlatFileParser.LineType>

Represents the type of a line matched or unmatched by the parser.


Enum Constant Summary
DATA
          The parsed line is a data line, which could be split into the specified number of columns by FlatFileParser.setDataSplitterRegexp(Pattern).
DATA_FOOTER
          The parsed line is the data footer line, matching the regular expression specified by FlatFileParser.setDataFooterRegexp(Pattern).
DATA_HEADER
          The parsed line is the data header line, matching the regular expression specified by FlatFileParser.setDataHeaderRegexp(Pattern).
HEADER
          The parsed line is a header line, matching the regular expression specified by FlatFileParser.setHeaderRegexp(Pattern).
IGNORED
          The parsed line was ignored since it matched the regular expression specified by FlatFileParser.setIgnoreRegexp(Pattern).
SECTION
          The parsed line is the line starting a section, matching the regular expression specified by FlatFileParser.setSectionRegexp(Pattern).
UNKNOWN
          The parsed line is of an unknown type.
 
Field Summary
private  String title
           
 
Method Summary
 String toString()
           
static FlatFileParser.LineType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FlatFileParser.LineType[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HEADER

public static final FlatFileParser.LineType HEADER
The parsed line is a header line, matching the regular expression specified by FlatFileParser.setHeaderRegexp(Pattern).


DATA_HEADER

public static final FlatFileParser.LineType DATA_HEADER
The parsed line is the data header line, matching the regular expression specified by FlatFileParser.setDataHeaderRegexp(Pattern).


DATA

public static final FlatFileParser.LineType DATA
The parsed line is a data line, which could be split into the specified number of columns by FlatFileParser.setDataSplitterRegexp(Pattern).

See Also:
FlatFileParser.setMinDataColumns(int), FlatFileParser.setMaxDataColumns(int)

SECTION

public static final FlatFileParser.LineType SECTION
The parsed line is the line starting a section, matching the regular expression specified by FlatFileParser.setSectionRegexp(Pattern).


DATA_FOOTER

public static final FlatFileParser.LineType DATA_FOOTER
The parsed line is the data footer line, matching the regular expression specified by FlatFileParser.setDataFooterRegexp(Pattern).


IGNORED

public static final FlatFileParser.LineType IGNORED
The parsed line was ignored since it matched the regular expression specified by FlatFileParser.setIgnoreRegexp(Pattern).


UNKNOWN

public static final FlatFileParser.LineType UNKNOWN
The parsed line is of an unknown type.

Field Detail

title

private final String title
Method Detail

values

public static FlatFileParser.LineType[] 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 (FlatFileParser.LineType c : FlatFileParser.LineType.values())
    System.out.println(c);

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

valueOf

public static FlatFileParser.LineType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toString

public String toString()
Overrides:
toString in class Enum<FlatFileParser.LineType>

2.17.2: 2011-06-17