Package org.silverpeas.core.util
Enum OsEnum
- java.lang.Object
-
- java.lang.Enum<OsEnum>
-
- org.silverpeas.core.util.OsEnum
-
- All Implemented Interfaces:
Serializable
,Comparable<OsEnum>
public enum OsEnum extends Enum<OsEnum>
- Author:
- Emmanuel Hugonnet
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LINUX
MAC_OSX
NETWARE
OPENVMS
OS_400
WINDOWS_9X
WINDOWS_SEVEN
WINDOWS_VISTA
WINDOWS_XP
Z_OS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OsEnum
getOS()
static OsEnum
getOS(String value)
boolean
isWindows()
static OsEnum
valueOf(String name)
Returns the enum constant of this type with the specified name.static OsEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
WINDOWS_XP
public static final OsEnum WINDOWS_XP
-
WINDOWS_9X
public static final OsEnum WINDOWS_9X
-
WINDOWS_VISTA
public static final OsEnum WINDOWS_VISTA
-
WINDOWS_SEVEN
public static final OsEnum WINDOWS_SEVEN
-
LINUX
public static final OsEnum LINUX
-
MAC_OSX
public static final OsEnum MAC_OSX
-
OS_400
public static final OsEnum OS_400
-
Z_OS
public static final OsEnum Z_OS
-
OPENVMS
public static final OsEnum OPENVMS
-
NETWARE
public static final OsEnum NETWARE
-
-
Field Detail
-
windows
protected final boolean windows
-
name
protected final String name
-
-
Method Detail
-
values
public static OsEnum[] 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 (OsEnum c : OsEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OsEnum valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getOS
public static OsEnum getOS()
-
isWindows
public boolean isWindows()
-
-