jcommon.core
Enum OSFamily
java.lang.Object
java.lang.Enum<OSFamily>
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
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
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.