public enum OperatingSystem extends Enum<OperatingSystem>
Operating systems are classified loosely. For example, individual versions of macOS and Windows are not considered distinct, and Linux distributions are not differentiated.
If the system is started on an unsupported operating system, like FreeBSD or Solaris, the operating system
will be reported as LINUX
.
Enum Constant and Description |
---|
LINUX
Linux-based operating systems.
|
MAC_OS
Mac-based operating systems.
|
WINDOWS
Windows-based operating systems.
|
Modifier and Type | Method and Description |
---|---|
static OperatingSystem |
valueOf(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 LINUX
public static final OperatingSystem MAC_OS
public static final OperatingSystem WINDOWS
public static OperatingSystem[] values()
for (OperatingSystem c : OperatingSystem.values()) System.out.println(c);
public static OperatingSystem 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 nullCopyright © 2019 Atlassian. All rights reserved.