com.mucommander.runtime
Class OsVersion
java.lang.Object
com.mucommander.runtime.RuntimeProperty
com.mucommander.runtime.ComparableRuntimeProperty
com.mucommander.runtime.OsVersion
- All Implemented Interfaces:
- OsVersions, java.lang.Comparable
public class OsVersion
- extends ComparableRuntimeProperty
- implements OsVersions
This class represents a major version of an operating system, like Mac OS X 10.5 or
Windows XP. The current runtime value is determined using the value of the os.version
system property and the current OsFamily instance.
Being a ComparableRuntimeProperty, OS versions are ordered and can be compared
against each other.
- Author:
- Maxence Bernard
- See Also:
OsVersions,
OsFamily
| Fields inherited from interface com.mucommander.runtime.OsVersions |
MAC_OS_X_10_0, MAC_OS_X_10_1, MAC_OS_X_10_2, MAC_OS_X_10_3, MAC_OS_X_10_4, MAC_OS_X_10_5, UNKNOWN_VERSION, WINDOWS_2000, WINDOWS_2003, WINDOWS_95, WINDOWS_98, WINDOWS_ME, WINDOWS_NT, WINDOWS_VISTA, WINDOWS_XP |
|
Constructor Summary |
protected |
OsVersion(java.lang.String stringRepresentation,
int intValue)
|
|
Method Summary |
static OsVersion |
getCurrent()
Returns the OS version of the current runtime environment. |
protected RuntimeProperty |
getCurrentValue()
Returns the current runtime environment's value of this runtime property. |
static java.lang.String |
getRawSystemProperty()
Returns the value of the system property which serves to detect the OS version at runtime. |
static void |
init()
Determines the current value by parsing the corresponding system property. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OsVersion
protected OsVersion(java.lang.String stringRepresentation,
int intValue)
init
public static void init()
- Determines the current value by parsing the corresponding system property. This method is called automatically
by this class the first time the current value is accessed. However, this method has been made public to allow
to force the initialization if it needs to happen at a predictable time.
getCurrent
public static OsVersion getCurrent()
- Returns the OS version of the current runtime environment.
- Returns:
- the OS version of the current runtime environment
getRawSystemProperty
public static java.lang.String getRawSystemProperty()
- Returns the value of the system property which serves to detect the OS version at runtime.
- Returns:
- the value of the system property which serves to detect the OS version at runtime.
getCurrentValue
protected RuntimeProperty getCurrentValue()
- Description copied from class:
RuntimeProperty
- Returns the current runtime environment's value of this runtime property.
- Specified by:
getCurrentValue in class RuntimeProperty
- Returns:
- the current runtime environment's value of this runtime property
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard