Package net.sf.basedb.util.parser
Enum FlatFileParser.LineType
- java.lang.Object
-
- java.lang.Enum<FlatFileParser.LineType>
-
- 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
Enum Constants Enum Constant Description DATA
The parsed line is a data line, which could be split into the specified number of columns byFlatFileParser.setDataSplitterRegexp(Pattern)
.DATA_FOOTER
The parsed line is the data footer line, matching the regular expression specified byFlatFileParser.setDataFooterRegexp(Pattern)
.DATA_HEADER
The parsed line is the data header line, matching the regular expression specified byFlatFileParser.setDataHeaderRegexp(Pattern)
.HEADER
The parsed line is a header line, matching the regular expression specified byFlatFileParser.setHeaderRegexp(Pattern)
.IGNORED
The parsed line was ignored since it matched the regular expression specified byFlatFileParser.setIgnoreRegexp(Pattern)
.SECTION
The parsed line is the line starting a section, matching the regular expression specified byFlatFileParser.setSectionRegexp(Pattern)
.UNKNOWN
The parsed line is of an unknown type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Enum Constant Detail
-
HEADER
public static final FlatFileParser.LineType HEADER
The parsed line is a header line, matching the regular expression specified byFlatFileParser.setHeaderRegexp(Pattern)
.
-
DATA_HEADER
public static final FlatFileParser.LineType DATA_HEADER
The parsed line is the data header line, matching the regular expression specified byFlatFileParser.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 byFlatFileParser.setDataSplitterRegexp(Pattern)
.
-
SECTION
public static final FlatFileParser.LineType SECTION
The parsed line is the line starting a section, matching the regular expression specified byFlatFileParser.setSectionRegexp(Pattern)
.
-
DATA_FOOTER
public static final FlatFileParser.LineType DATA_FOOTER
The parsed line is the data footer line, matching the regular expression specified byFlatFileParser.setDataFooterRegexp(Pattern)
.
-
IGNORED
public static final FlatFileParser.LineType IGNORED
The parsed line was ignored since it matched the regular expression specified byFlatFileParser.setIgnoreRegexp(Pattern)
.
-
UNKNOWN
public static final FlatFileParser.LineType UNKNOWN
The parsed line is of an unknown type.
-
-
Field Detail
-
title
private final String title
-
-
Constructor Detail
-
LineType
private LineType(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 nameNullPointerException
- if the argument is null
-
toString
public String toString()
- Overrides:
toString
in classEnum<FlatFileParser.LineType>
-
-