com.mucommander.runtime
Class OsVersion

java.lang.Object
  extended by com.mucommander.runtime.RuntimeProperty
      extended by com.mucommander.runtime.ComparableRuntimeProperty
          extended by 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

Field Summary
 
Fields inherited from class com.mucommander.runtime.ComparableRuntimeProperty
discriminator
 
Fields inherited from class com.mucommander.runtime.RuntimeProperty
stringRepresentation
 
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 com.mucommander.runtime.ComparableRuntimeProperty
compareTo, isCurrentHigher, isCurrentLower, isCurrentOrHigher, isCurrentOrLower
 
Methods inherited from class com.mucommander.runtime.RuntimeProperty
isCurrent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OsVersion

protected OsVersion(java.lang.String stringRepresentation,
                    int intValue)
Method Detail

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