Package eu.simuline.util
Enum DetOs
- java.lang.Object
-
- java.lang.Enum<DetOs>
-
- eu.simuline.util.DetOs
-
- All Implemented Interfaces:
Serializable,Comparable<DetOs>
public enum DetOs extends Enum<DetOs>
Enumerates the most important operating system and determines the current operating system. This is needed for jne/jna-applications, not when used with pure jave.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateDetOs()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DetOsgetOpSys()Returns a representation of the operating system currently running.(package private) abstract booleanisThis()Returns whether this is the operating system currently running.static voidmain(String[] args)private static StringosString()Returns a string representation of the operating system currently running as given by propertyos.namein lower case.static DetOsvalueOf(String name)Returns the enum constant of this type with the specified name.static DetOs[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static DetOs[] 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 (DetOs c : DetOs.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DetOs 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 nameNullPointerException- if the argument is null
-
isThis
abstract boolean isThis()
Returns whether this is the operating system currently running.
-
osString
private static String osString()
Returns a string representation of the operating system currently running as given by propertyos.namein lower case.- See Also:
System.getProperty(String)
-
getOpSys
public static DetOs getOpSys()
Returns a representation of the operating system currently running.- Throws:
IllegalStateException- if the operating system cannot be detected.
-
main
public static void main(String[] args)
-
-