public enum MacOSVersion extends java.lang.Enum<MacOSVersion> implements VersionCompare
枚举常量和说明 |
---|
CHEETAH |
EL_CAPITAN |
JAGUAR |
LEOPARD |
LION |
MAVERICKS |
MOUNTAIN_LION |
PANTHER |
PUMA |
SIERRA |
SNOW_LEOPARD |
TIGER |
YOSEMITE |
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getDisplay()
Returns codename, such as Yosemite
|
static MacOSVersion |
getExact(java.lang.String display,
java.lang.String version) |
static MacOSVersion |
getFromString()
Gets MacOSVersion for this machine
|
static MacOSVersion |
getFromString(java.lang.String search)
Gets MacOSVersion from string Will detect "10.11.*" if parameter search is is "10.11"
|
java.lang.String |
getVersion()
Version of OS X, such as 10.10
|
boolean |
isNewer(java.lang.Enum<?> e)
Checks if current version is newer than e
|
boolean |
isOlder(java.lang.Enum<?> e)
Checks if current version is older than e
|
boolean |
isOSX()
Indicates if this is Mac OS X or the newer macOS
|
static MacOSVersion |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static MacOSVersion[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final MacOSVersion CHEETAH
public static final MacOSVersion PUMA
public static final MacOSVersion JAGUAR
public static final MacOSVersion PANTHER
public static final MacOSVersion TIGER
public static final MacOSVersion LEOPARD
public static final MacOSVersion SNOW_LEOPARD
public static final MacOSVersion LION
public static final MacOSVersion MOUNTAIN_LION
public static final MacOSVersion MAVERICKS
public static final MacOSVersion YOSEMITE
public static final MacOSVersion EL_CAPITAN
public static final MacOSVersion SIERRA
public static MacOSVersion[] values()
for (MacOSVersion c : MacOSVersion.values()) System.out.println(c);
public static MacOSVersion valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException
- 如果参数为空值public java.lang.String getDisplay()
public java.lang.String getVersion()
public boolean isOSX()
public static MacOSVersion getFromString()
public static MacOSVersion getFromString(java.lang.String search)
public static MacOSVersion getExact(java.lang.String display, java.lang.String version)
public boolean isNewer(java.lang.Enum<?> e)
VersionCompare
isNewer
在接口中 VersionCompare
public boolean isOlder(java.lang.Enum<?> e)
VersionCompare
isOlder
在接口中 VersionCompare