public enum Platform extends java.lang.Enum<Platform>
Enum Constant and Description |
---|
ANDROID |
ANY
Never returned, but can be used to request a browser running on any operating system.
|
EL_CAPITAN |
LINUX |
MAC |
MAVERICKS |
MOUNTAIN_LION |
SIERRA |
SNOW_LEOPARD |
UNIX
Many platforms have UNIX traits, amongst them LINUX, Solaris and BSD.
|
VISTA
For versions of Windows that "feel like" Windows Vista.
|
WIN10 |
WIN8
For versions of Windows that "feel like" Windows 8.
|
WIN8_1 |
WINDOWS
Never returned, but can be used to request a browser running on any version of Windows.
|
XP
For versions of Windows that "feel like" Windows XP.
|
YOSEMITE |
Modifier and Type | Method and Description |
---|---|
static Platform |
extractFromSysProperty(java.lang.String osName)
Extracts platforms based on system properties in Java and uses a heuristic to determine the
most likely operating system.
|
static Platform |
extractFromSysProperty(java.lang.String osName,
java.lang.String osVersion)
Extracts platforms based on system properties in Java and uses a heuristic to determine the
most likely operating system.
|
Platform |
family()
Returns a platform that represents a family for the current platform.
|
static Platform |
fromString(java.lang.String name)
Gets a platform with the name matching the parameter.
|
static Platform |
getCurrent()
Get current platform (not necessarily the same as operating system).
|
int |
getMajorVersion()
Returns the major version of this platform.
|
int |
getMinorVersion()
Returns the minor version of this platform.
|
java.lang.String[] |
getPartOfOsName() |
boolean |
is(Platform compareWith)
Heuristic for comparing two platforms.
|
static Platform |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Platform[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Platform WINDOWS
public static final Platform XP
public static final Platform VISTA
public static final Platform WIN8
public static final Platform WIN8_1
public static final Platform WIN10
public static final Platform MAC
public static final Platform SNOW_LEOPARD
public static final Platform MOUNTAIN_LION
public static final Platform MAVERICKS
public static final Platform YOSEMITE
public static final Platform EL_CAPITAN
public static final Platform SIERRA
public static final Platform UNIX
public static final Platform LINUX
public static final Platform ANDROID
public static final Platform ANY
public static Platform[] values()
for (Platform c : Platform.values()) System.out.println(c);
public static Platform valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String[] getPartOfOsName()
public static Platform getCurrent()
public static Platform extractFromSysProperty(java.lang.String osName)
osName
- the operating system name to determine the platform ofpublic static Platform extractFromSysProperty(java.lang.String osName, java.lang.String osVersion)
osName
- the operating system name to determine the platform ofosVersion
- the operating system version to determine the platform ofpublic static Platform fromString(java.lang.String name)
name
- the platform namepublic boolean is(Platform compareWith)
compareWith
- the platform to compare withpublic Platform family()
public int getMajorVersion()
public int getMinorVersion()