|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.tools.JavaVersion
public class JavaVersion
Immutable version class constructed from a Java version string (ir without for the current JREs version). The Java version takes the form:
major.middle.minor[_update][-identifier]
Object's of this class can be used to compare Java different versions. Note that for the purposes of comparison the identifier is considered only in so much as it is present or not - its actual value is unimportant. Therefore for two otherwise identical versions the presence of an identifier in one will make it a lower version than the other. This is because standard identifier values have not been identified by Sun.
Constructor Summary | |
---|---|
JavaVersion()
Construct a JavaVersion object for the current Java environment. |
|
JavaVersion(java.lang.String sJavaVersion)
Construct a JavaVersion object from the supplied string. |
Method Summary | |
---|---|
int |
compareTo(JavaVersion object)
Compare this JavaVersion object with another object. |
boolean |
equals(java.lang.Object object)
|
int |
getMajor()
Get Java version's major number. |
int |
getMiddle()
Get Java version's middle number. |
int |
getMinor()
Get Java version's minor number. |
int |
hashCode()
|
java.lang.String |
toString()
Get a string representation of the Java version. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JavaVersion()
public JavaVersion(java.lang.String sJavaVersion)
sJavaVersion
- The Java version stringMethod Detail |
---|
public int getMajor()
public int getMiddle()
public int getMinor()
public int compareTo(JavaVersion object)
compareTo
in interface java.lang.Comparable<JavaVersion>
object
- Object to compare JavaVersion with
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |