public enum OperatingSystem extends java.lang.Enum<OperatingSystem>
| Modifier and Type | Method and Description |
|---|---|
static OperatingSystem |
current()
Returns the current operating system we are running on.
|
static OperatingSystem |
forOsName(java.lang.String name)
Get the matching
OperatingSystem instance for the given name. |
static boolean |
isMacOs()
Convenience method to check of we are on MacOS.
|
static boolean |
isSupported()
Convenience method to check if the OS is supported.
|
static boolean |
isWindows()
Convenience method to check if we are on Windows.
|
static OperatingSystem |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OperatingSystem[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OperatingSystem WINDOWS
public static final OperatingSystem MAC_OS
public static OperatingSystem[] values()
for (OperatingSystem c : OperatingSystem.values()) System.out.println(c);
public static OperatingSystem valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static OperatingSystem current()
public static OperatingSystem forOsName(java.lang.String name)
OperatingSystem instance for the given name.
If the name is not supported than this method returns NULL.name - the OS namepublic static boolean isMacOs()
public static boolean isWindows()
public static boolean isSupported()