Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## org.crosswire.common.util
Enum OSType

    java.lang.Object
      java.lang.Enum<OSType>
          org.crosswire.common.util.OSType

All Implemented Interfaces:
  Serializable, Comparable<OSType>

    public enum OSType

extends Enum<OSType>

Types of Operating Systems for which specialized behavior is needed.

Author:
  DM Smith
See Also:
  `The GNU Lesser General Public License for details.`

Enum Constant Summary
`DEFAULT`
`MAC`
`WIN32`

Field Summary
`private static String` | `MAC_USER_DATA_AREA` The Mac user settings parent directory
`private String` | `name` The name of the type
`private static OSType` | `osType` The machine's osType
`private static String` | `WIN32_USER_DATA_AREA` The Windows user settings parent directory

Method Summary
`static OSType` | `fromString(String name)` Lookup method to convert from a String to an OSType
`static OSType` | `getOSType()` Get the machine's OSType.
`abstract URI` | `getUserArea()` Get the user area for this OSType.
`abstract URI` | `getUserAreaFolder(String hiddenFolderName, String visibleFolderName)` A folder in the user area.
`static URI` | `getUserHome()`
`String` | `toString()`
`static OSType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static OSType[]` | `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

### MAC

    public static final OSType MAC

### WIN32

    public static final OSType WIN32

### DEFAULT

    public static final OSType DEFAULT

Field Detail

### name

    private String name

  The name of the type

### WIN32_USER_DATA_AREA

    private static final String WIN32_USER_DATA_AREA

  The Windows user settings parent directory

  See Also:
    Constant Field Values

### MAC_USER_DATA_AREA

    private static final String MAC_USER_DATA_AREA

  The Mac user settings parent directory

  See Also:
    Constant Field Values

### osType

    private static OSType osType

  The machine's osType

Method Detail

### values

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

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

### valueOf

    public static OSType 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

### getUserArea

    public abstract URI getUserArea()

  Get the user area for this OSType.

  Returns:
    the user area

### getUserAreaFolder

    public abstract URI getUserAreaFolder(String hiddenFolderName,
                                          String visibleFolderName)

  A folder in the user area. This osType will determine which to use in constructing the URI to the folder.

  Parameters:
    `hiddenFolderName` - is typically a "unix" hidden folder name such as .jsword.
    `visibleFolderName` - is an visible folder name, such as JSword.
  Returns:
    the user area folder

### getUserHome

    public static URI getUserHome()

  Returns:
    the URI of the user home

### getOSType

    public static OSType getOSType()

  Get the machine's OSType.

  Returns:
    the machine's OSType

### fromString

    public static OSType fromString(String name)

  Lookup method to convert from a String to an OSType

  Parameters:
    `name` - the name of an OSType
  Returns:
    the OSType or DEFAULT

### toString

    public String toString()

  Overrides:
    `toString` in class `Enum<OSType>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2015
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD