|
Sweet Home 3D 4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.eteks.sweethome3d.tools.OperatingSystem
public class OperatingSystem
Tools used to test current user operating system.
Method Summary | |
---|---|
static int |
compareVersions(String version1,
String version2)
Returns a negative number if version1 < version2 ,
0 if version1 = version2
and a positive number if version1 > version2 . |
static File |
createTemporaryFile(String prefix,
String suffix)
Returns a temporary file that will be deleted when JVM will exit. |
static void |
deleteTemporaryFiles()
Deletes all the temporary files created with createTemporaryFile . |
static File |
getDefaultApplicationFolder()
Returns default application folder. |
static Comparator<File> |
getFileVersionComparator()
Returns a file comparator that sorts file names according to their version number. |
static boolean |
isJavaVersionGreaterOrEqual(String javaMinimumVersion)
Returns true if the given version is greater than or equal to the version
of the current JVM. |
static boolean |
isLinux()
Returns true if current operating is Linux. |
static boolean |
isMacOSX()
Returns true if current operating is Mac OS X. |
static boolean |
isMacOSXLeopardOrSuperior()
Returns true if current operating is Mac OS X 10.5
or superior. |
static boolean |
isWindows()
Returns true if current operating is Windows. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isLinux()
true
if current operating is Linux.
public static boolean isWindows()
true
if current operating is Windows.
public static boolean isMacOSX()
true
if current operating is Mac OS X.
public static boolean isMacOSXLeopardOrSuperior()
true
if current operating is Mac OS X 10.5
or superior.
public static boolean isJavaVersionGreaterOrEqual(String javaMinimumVersion)
true
if the given version is greater than or equal to the version
of the current JVM.
public static int compareVersions(String version1, String version2)
version1
< version2
,
0 if version1
= version2
and a positive number if version1
> version2
.
Version strings are first split into parts, each subpart ending at each punctuation, space
or when a character of a different type is encountered (letter vs digit). Then each numeric
or string subparts are compared to each other, strings being considered greater than numbers
except for pre release strings (i.e. alpha, beta, rc). Examples:"" < "1" "0" < "1.0" "1.2beta" < "1.2" "1.2beta" < "1.2beta2" "1.2beta" < "1.2.0" "1.2beta4" < "1.2beta10" "1.2beta4" < "1.2" "1.2beta4" < "1.2rc" "1.2alpha" < "1.2beta" "1.2beta" < "1.2rc" "1.2rc" < "1.2" "1.2rc" < "1.2a" "1.2" < "1.2a" "1.2a" < "1.2b" "1.7.0_11" < "1.7.0_12" "1.7.0_11rc1" < "1.7.0_11rc2" "1.7.0_11rc" < "1.7.0_11" "1.7.0_9" < "1.7.0_11rc" "1.2" < "1.2.1" "1.2" < "1.2.0.1" "1.2" = "1.2.0.0" (missing information is considered as 0) "1.2beta4" = "1.2 beta-4" (punctuation, space or missing punctuation doesn't influence result) "1.2beta4" = "1,2,beta,4"
public static File createTemporaryFile(String prefix, String suffix) throws IOException
IOException
- if the file couldn't be createdpublic static Comparator<File> getFileVersionComparator()
public static void deleteTemporaryFiles()
createTemporaryFile
.
public static File getDefaultApplicationFolder() throws IOException
IOException
|
Sweet Home 3D 4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License |