jcommon.core
Enum OSFamily

java.lang.Object
  extended by java.lang.Enum<OSFamily>
      extended by jcommon.core.OSFamily
All Implemented Interfaces:
Serializable, Comparable<OSFamily>

public enum OSFamily
extends Enum<OSFamily>

Gathers information about operating systems and the one we're hosted on.

Author:
David Hoyt

Enum Constant Summary
Mac
           
Solaris
           
Unix
           
Unknown
           
VMS
           
Windows
           
 
Method Summary
static OSFamily fromName(String Name)
           
 String getPlatformPartName()
           
static OSFamily getSystemOSFamily()
           
 boolean isPOSIX()
           
static boolean isPOSIX(OS OS)
           
static boolean isPOSIX(OSFamily OSFamily)
           
static OSFamily valueOf(String name)
          Returns the enum constant of this type with the specified name.
static OSFamily[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Unknown

public static final OSFamily Unknown

Windows

public static final OSFamily Windows

Mac

public static final OSFamily Mac

Unix

public static final OSFamily Unix

Solaris

public static final OSFamily Solaris

VMS

public static final OSFamily VMS
Method Detail

values

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

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

valueOf

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

getSystemOSFamily

public static OSFamily getSystemOSFamily()

getPlatformPartName

public String getPlatformPartName()

isPOSIX

public boolean isPOSIX()

isPOSIX

public static boolean isPOSIX(OS OS)

isPOSIX

public static boolean isPOSIX(OSFamily OSFamily)

fromName

public static OSFamily fromName(String Name)


Copyright © 2012-2013. All Rights Reserved.