com.partnersoft.core
Enum OS

java.lang.Object
  extended by java.lang.Enum<OS>
      extended by com.partnersoft.core.OS
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OS>

public enum OS
extends java.lang.Enum<OS>

An enumeration of Partner-supported operating systems.

Copyright 1997-2006 Partner Software, Inc.

Version:
$Id: OS.java 1012 2007-11-24 18:30:02Z paul $
Author:
Paul Reavis, Russell Cagle

Enum Constant Summary
LINUX
           
MAC
           
PALM
           
POCKETPC
           
SOLARIS
           
UNKNOWN
           
WINDOWS
           
 
Method Summary
 java.lang.String getLabel()
          Returns a human-friendly label for the OS.
 java.lang.String getName()
          Returns a short name for the os.
 java.lang.String toString()
           
static OS valueInDescription(java.lang.String description)
          Returns the correct instance of OS for the given descriptive string.
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.
 
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

LINUX

public static final OS LINUX

MAC

public static final OS MAC

PALM

public static final OS PALM

POCKETPC

public static final OS POCKETPC

SOLARIS

public static final OS SOLARIS

WINDOWS

public static final OS WINDOWS

UNKNOWN

public static final OS UNKNOWN
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 name
java.lang.NullPointerException - if the argument is null

valueInDescription

public static OS valueInDescription(java.lang.String description)
Returns the correct instance of OS for the given descriptive string.

Parameters:
description - Descriptive string as returned by System.getProperty("os.name") (or containing the name for the OS in any case or position).
Returns:
Enumerated OS type for the given description.

getName

public java.lang.String getName()
Returns a short name for the os. It has no spaces or special punctuation, thus is suitable to name directories or files or other system objects based on it.

Returns:
unique name for the OS.

getLabel

public java.lang.String getLabel()
Returns a human-friendly label for the OS.

Returns:
label describing the OS.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<OS>