public enum EOperatingSystem extends Enum<EOperatingSystem> implements IHasDisplayName
| Enum Constant and Description |
|---|
AIX
The value indicating the AIX operating system.
|
FREEBSD
The value indicating the FreeBSD operating system.
|
HPUX
The value indicating the HP-UX operating system.
|
LINUX
The value indicating the Linux operating system.
|
MACOS
The value indicating the Mac OS X operating system.
|
SOLARIS
The value indicating the Solaris operating system.
|
UNKNOWN
The value indicating an unknown operating system.
|
WINDOWS
The value indicating the Windows operating system.
|
ZOS
The value indicating the z/OS operating system.
|
| Modifier and Type | Method and Description |
|---|---|
static EOperatingSystem |
forName(String sOSName)
Retrieves the operating system for the provided name.
|
static EOperatingSystem |
getCurrentOS() |
static String |
getCurrentOSName() |
static String |
getCurrentOSVersion() |
String |
getDisplayName() |
ENewLineMode |
getNewLineMode() |
boolean |
isCurrentOS() |
boolean |
isUnixBased()
Indicates whether the provided operating system is UNIX-based.
|
static EOperatingSystem |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EOperatingSystem[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetComparatorCollatingpublic static final EOperatingSystem AIX
public static final EOperatingSystem FREEBSD
public static final EOperatingSystem HPUX
public static final EOperatingSystem LINUX
public static final EOperatingSystem MACOS
public static final EOperatingSystem SOLARIS
public static final EOperatingSystem WINDOWS
public static final EOperatingSystem ZOS
public static final EOperatingSystem UNKNOWN
public static EOperatingSystem[] values()
for (EOperatingSystem c : EOperatingSystem.values()) System.out.println(c);
public static EOperatingSystem 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 getDisplayName()
getDisplayName in interface IHasDisplayNamenull.public boolean isUnixBased()
true if the provided operating system is UNIX-based,
or false if not.public boolean isCurrentOS()
true if the this OS is the current OS.@Nonnull public ENewLineMode getNewLineMode()
@Nonnull public static EOperatingSystem forName(@Nullable String sOSName)
os.name system property.sOSName - The name for which to retrieve the corresponding operating system.UNKNOWN is returned and never
null.@Nonnull public static EOperatingSystem getCurrentOS()
null.@Nullable public static String getCurrentOSName()
Copyright © 2014–2017 Philip Helger. All rights reserved.