Package com.strobel.core
Enum OS
- java.lang.Object
-
- java.lang.Enum<OS>
-
- com.strobel.core.OS
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPAQ_OPEN_VMS
COMPAQ_TRU64_UNIX
FREE_BSD
HP_UX
IBM_AIX
LINUX
MAC
OS2
OTHER
Unrecognized OSSGI_IRIX
SOLARIS
SUN_OS
WINDOWS_2000
WINDOWS_7
WINDOWS_95
WINDOWS_98
WINDOWS_NT
WINDOWS_OTHER
WINDOWS_VISTA
-
Constructor Summary
Constructors Modifier Constructor Description private
OS(java.lang.String... names)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OS
get()
static OS
get(java.lang.String osName)
boolean
isUnix()
boolean
isWindows()
static OS
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static OS[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WINDOWS_NT
public static final OS WINDOWS_NT
-
WINDOWS_95
public static final OS WINDOWS_95
-
WINDOWS_98
public static final OS WINDOWS_98
-
WINDOWS_2000
public static final OS WINDOWS_2000
-
WINDOWS_VISTA
public static final OS WINDOWS_VISTA
-
WINDOWS_7
public static final OS WINDOWS_7
-
WINDOWS_OTHER
public static final OS WINDOWS_OTHER
-
SOLARIS
public static final OS SOLARIS
-
LINUX
public static final OS LINUX
-
HP_UX
public static final OS HP_UX
-
IBM_AIX
public static final OS IBM_AIX
-
SGI_IRIX
public static final OS SGI_IRIX
-
SUN_OS
public static final OS SUN_OS
-
COMPAQ_TRU64_UNIX
public static final OS COMPAQ_TRU64_UNIX
-
MAC
public static final OS MAC
-
FREE_BSD
public static final OS FREE_BSD
-
OS2
public static final OS OS2
-
COMPAQ_OPEN_VMS
public static final OS COMPAQ_OPEN_VMS
-
OTHER
public static final OS OTHER
Unrecognized OS
-
-
Field Detail
-
names
private final java.lang.String[] names
-
current
private static OS current
-
-
Method Detail
-
values
public static OS[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (OS c : OS.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OS valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isWindows
public boolean isWindows()
- Returns:
- true if this OS belongs to windows family
-
isUnix
public boolean isUnix()
- Returns:
- true if this OS belongs to *nix family
-
get
public static OS get(java.lang.String osName)
- Parameters:
osName
- name of OS as returned bySystem.getProperty("os.name")
- Returns:
- OS for the specified
osName
-
get
public static OS get()
- Returns:
- OS on which this JVM is running
-
-