Enum Class LineEnding
- All Implemented Interfaces:
Serializable, Comparable<LineEnding>, Constable
Specifies line separator (line ending) characters.
- Since:
- 26
-
Nested Class Summary
Nested classes/interfaces declared in class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetText()Returns the line ending as aString.static LineEndingsystem()Returns theLineEndingbased on the value of system line separator stringSystem.lineSeparator().static LineEndingReturns the enum constant of this class with the specified name.static LineEnding[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CR
Legacy Mac OS line ending, ASCII CR (0x0d). -
CRLF
Windows line ending, sequence of CR/LF (0x0d 0x0a). -
LF
macOS/Unix line ending, ASCII LF (0x0a).
-
-
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
-
getText
-
system
Returns theLineEndingbased on the value of system line separator stringSystem.lineSeparator().- Returns:
- the system default line ending
-