public int compareTo(WindowsVersion o) { int result = major - o.getMajor(); if (result == 0) { result = minor - o.getMinor(); } return result; }
static { windowsVersionMap.put(WINDOWS_95.toString(), WINDOWS_95); windowsVersionMap.put(WINDOWS_98.toString(), WINDOWS_98); windowsVersionMap.put(WINDOWS_ME.toString(), WINDOWS_ME); windowsVersionMap.put(WINDOWS_2000.toString(), WINDOWS_2000); windowsVersionMap.put(WINDOWS_XP.toString(), WINDOWS_XP); windowsVersionMap.put(WINDOWS_2003.toString(), WINDOWS_2003); windowsVersionMap.put(WINDOWS_VISTA.toString(), WINDOWS_VISTA); }