public enum OperatingSystem extends java.lang.Enum<OperatingSystem>
限定符和类型 | 方法和说明 |
---|---|
static void |
clearCache()
Forces reloading of data next time retreiving operating system
|
java.lang.String |
getName() |
static AbstractOperatingSystem |
getOperatingSystem() |
static AbstractOperatingSystem |
getOperatingSystem(boolean b)
Gets this machines operating system
|
static OperatingSystem |
getOperatingSystem(java.lang.String str)
Gets the operating system (Not linux distro)
|
java.lang.String |
getPrimarySearch() |
java.lang.String[] |
getSearch() |
static boolean |
isUnix() |
static boolean |
isUnix(OperatingSystem os) |
static OperatingSystem |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static OperatingSystem[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final OperatingSystem WINDOWS
public static final OperatingSystem MACOS
public static final OperatingSystem LINUX
public static final OperatingSystem SOLARIS
public static final OperatingSystem BSD
public static final OperatingSystem UNKNOWN
public static OperatingSystem[] values()
for (OperatingSystem c : OperatingSystem.values()) System.out.println(c);
public static OperatingSystem valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException
- 如果参数为空值public java.lang.String getName()
public java.lang.String[] getSearch()
public java.lang.String getPrimarySearch()
public static OperatingSystem getOperatingSystem(java.lang.String str)
public static AbstractOperatingSystem getOperatingSystem()
public static AbstractOperatingSystem getOperatingSystem(boolean b)
public static void clearCache()
public static boolean isUnix()
public static boolean isUnix(OperatingSystem os)