public enum WindowsVersion extends java.lang.Enum<WindowsVersion> implements VersionCompare
枚举常量和说明 |
---|
UNKNOWN |
WIN10 |
WIN2000 |
WIN7 |
WIN8 |
WIN81 |
WINSERVER2003 |
WINSERVER2008 |
WINSERVER2012 |
WINVISTA |
WINXP |
限定符和类型 | 方法和说明 |
---|---|
static WindowsVersion |
getFromString()
Returns WindowsVersion for current machine
|
static WindowsVersion |
getFromString(java.lang.String search) |
java.lang.String |
getSearch() |
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
|
static WindowsVersion |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static WindowsVersion[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final WindowsVersion UNKNOWN
public static final WindowsVersion WIN2000
public static final WindowsVersion WINXP
public static final WindowsVersion WINSERVER2003
public static final WindowsVersion WINVISTA
public static final WindowsVersion WINSERVER2008
public static final WindowsVersion WIN7
public static final WindowsVersion WIN81
public static final WindowsVersion WIN8
public static final WindowsVersion WINSERVER2012
public static final WindowsVersion WIN10
public static WindowsVersion[] values()
for (WindowsVersion c : WindowsVersion.values()) System.out.println(c);
public static WindowsVersion valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException
- 如果参数为空值public java.lang.String getSearch()
public static WindowsVersion getFromString()
public static WindowsVersion getFromString(java.lang.String search)
search
- Can only be strings like "windows 8", not version numberpublic boolean isNewer(java.lang.Enum<?> e)
VersionCompare
isNewer
在接口中 VersionCompare
public boolean isOlder(java.lang.Enum<?> e)
VersionCompare
isOlder
在接口中 VersionCompare