Package jmri.util
Class SystemType
java.lang.Object
jmri.util.SystemType
Common utility methods for determining which type of operating system is in
use.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringThe os.name propertystatic intgetType()Get the integer constant for the OS.static booleanisLinux()Convenience method to determine if OS is Linux.static booleanisMacOSX()Convenience method to determine if OS is Mac OS X.static booleanisOS2()Convenience method to determine if OS is OS/2.static booleanisUnix()Convenience method to determine if OS is Unix.static booleanConvenience method to determine if OS is Microsoft Windows.(package private) static voidsetType()
-
Field Details
-
MACCLASSIC
- See Also:
-
MACOSX
- See Also:
-
WINDOWS
- See Also:
-
LINUX
- See Also:
-
OS2
- See Also:
-
UNIX
- See Also:
-
type
-
isSet
-
osName
-
-
Constructor Details
-
SystemType
public SystemType()
-
-
Method Details
-
getType
Get the integer constant for the OS. Useful in switch statements.- Returns:
- Type as an integer
-
getOSName
The os.name property- Returns:
- OS name
-
isMacOSX
Convenience method to determine if OS is Mac OS X. Useful if an exception needs to be made for Mac OS X.- Returns:
- true if on Mac OS X.
-
isLinux
Convenience method to determine if OS is Linux. Useful if an exception needs to be made for Linux.- Returns:
- true if on Linux
-
isWindows
Convenience method to determine if OS is Microsoft Windows. Useful if an exception needs to be made for Microsoft Windows.- Returns:
- true if on Microsoft Windows
-
isOS2
Convenience method to determine if OS is OS/2. Useful if an exception needs to be made for OS/2.- Returns:
- true if on OS/2
-
isUnix
Convenience method to determine if OS is Unix. Useful if an exception needs to be made for Unix.- Returns:
- true if on Unix
-
setType
-