- All Implemented Interfaces:
Serializable,Comparable<LineDelimiter>,Constable
Enumeration for different line delimiters (LF, CR, CRLF, platform default).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCarriage Return - (Mac classic).Carriage Return and Line Feed (Windows).Line Feed - (UNIX).Use current platform default (System.lineSeparator(). -
Method Summary
Modifier and TypeMethodDescriptionstatic LineDelimiterBuild an enum based on the given string.toString()static LineDelimiterReturns the enum constant of this class with the specified name.static LineDelimiter[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LF
Line Feed - (UNIX). -
CR
Carriage Return - (Mac classic). -
CRLF
Carriage Return and Line Feed (Windows). -
PLATFORM
Use current platform default (System.lineSeparator().
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
of
Build an enum based on the given string.- Parameters:
str- the string to convert to an enum.- Returns:
- the enum representation of the given string.
-
toString
- Overrides:
toStringin classEnum<LineDelimiter>
-