com.silverpeas.util
Enum OsEnum

java.lang.Object
  extended by java.lang.Enum<OsEnum>
      extended by com.silverpeas.util.OsEnum
All Implemented Interfaces:
Serializable, Comparable<OsEnum>

public enum OsEnum
extends Enum<OsEnum>

Author:
Emmanuel Hugonnet

Enum Constant Summary
LINUX
           
MAC_OSX
           
NETWARE
           
OPENVMS
           
OS_400
           
WINDOWS_9X
           
WINDOWS_SEVEN
           
WINDOWS_VISTA
           
WINDOWS_XP
           
Z_OS
           
 
Field Summary
protected  String name
           
protected  boolean windows
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 name
NullPointerException - if the argument is null

getOS

public static OsEnum getOS(String value)

getOS

public static OsEnum getOS()

isWindows

public boolean isWindows()


Copyright © 2016 Silverpeas. All Rights Reserved.