com.twelvemonkeys.lang
Enum Platform.OperatingSystem

java.lang.Object
  extended by java.lang.Enum<Platform.OperatingSystem>
      extended by com.twelvemonkeys.lang.Platform.OperatingSystem
All Implemented Interfaces:
Serializable, Comparable<Platform.OperatingSystem>
Enclosing class:
Platform

public static enum Platform.OperatingSystem
extends Enum<Platform.OperatingSystem>

Enumeration of common OperatingSystems.

For unknown operating systems, getName() will return the the same value as System.getProperty("os.name").

Version:
$Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/lang/Platform.java#1 $
Author:
Harald Kuhr

Enum Constant Summary
Linux
           
MacOS
           
Solaris
           
Unknown
           
Windows
           
 
Method Summary
 String getName()
           
 String id()
           
 String toString()
           
static Platform.OperatingSystem valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Platform.OperatingSystem[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Windows

public static final Platform.OperatingSystem Windows

Linux

public static final Platform.OperatingSystem Linux

Solaris

public static final Platform.OperatingSystem Solaris

MacOS

public static final Platform.OperatingSystem MacOS

Unknown

public static final Platform.OperatingSystem Unknown
Method Detail

values

public static Platform.OperatingSystem[] 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 (Platform.OperatingSystem c : Platform.OperatingSystem.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Platform.OperatingSystem 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

getName

public String getName()

id

public String id()

toString

public String toString()
Overrides:
toString in class Enum<Platform.OperatingSystem>


Copyright © 2015. All Rights Reserved.