public enum PlatformType extends Enum<PlatformType>
Platform, in only a very general sense: Windows, Unix, etc.
See boolean functions like isUnix(), isWindows(), ... for slightly easier
syntax: if (Platform.detect().getType().isUnix()) ...
| Modifier and Type | Method and Description |
|---|---|
boolean |
isUnix()
Whether this is
UNIX. |
boolean |
isWindows() |
static PlatformType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PlatformType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PlatformType UNKNOWN
public static final PlatformType UNIX
public static final PlatformType WINDOWS
public static PlatformType[] values()
for (PlatformType c : PlatformType.values()) System.out.println(c);
public static PlatformType 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 nullpublic boolean isUnix()
UNIX. Makes for slightly easier syntax: if
(Platform.detect().getType().isUnix()) { ... } public boolean isWindows()