public enum ENewLineMode extends Enum<ENewLineMode>
| Enum Constant and Description |
|---|
MAC
Mac style - just \r (0x0D)
|
UNIX
Unix style - just \n (0x0A)
|
WINDOWS
Windows style - \r\n (0x0D 0x0A)
|
| Modifier and Type | Field and Description |
|---|---|
static ENewLineMode |
DEFAULT
The default newline mode as indicated by the system properties
|
| Modifier and Type | Method and Description |
|---|---|
static ENewLineMode |
getFromTextOrDefault(String sText,
ENewLineMode eDefault) |
static ENewLineMode |
getFromTextOrNull(String sText) |
String |
getText() |
boolean |
isMac() |
boolean |
isUnix() |
boolean |
isWindows() |
static ENewLineMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ENewLineMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ENewLineMode UNIX
public static final ENewLineMode MAC
public static final ENewLineMode WINDOWS
public static final ENewLineMode DEFAULT
public static ENewLineMode[] values()
for (ENewLineMode c : ENewLineMode.values()) System.out.println(c);
public static ENewLineMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@Nonnull @Nonempty public String getText()
null nor empty.public boolean isUnix()
true if this a Linux/Unix newline modepublic boolean isMac()
true if this a Mac newline modepublic boolean isWindows()
true if this a Windows newline mode@Nullable public static ENewLineMode getFromTextOrDefault(@Nullable String sText, @Nullable ENewLineMode eDefault)
@Nullable public static ENewLineMode getFromTextOrNull(@Nullable String sText)
Copyright © 2014–2016 Philip Helger. All rights reserved.