|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
javax.ide.util.Version
public final class Version
Represents the version number of an extension or component. A version number is an immutable ordered sequence of integer values.
Version numbers can be represented in two forms. When you construct a new Version object using a String representation of the version number, this String representation is stored and returned by the toString()
method. This form of the version number will retain any redundant leading zeros in any of the integer values which make up the version number.
Conversely, in the canonical form, a version number does not retain leading zeros. The canonical form of new Version( "1.02.03" ) would be "1.2.3". You can retrieve the canonical form of a Version object using the toCanonicalString()
method.
Constructor Summary | |
---|---|
Version(java.lang.String versionLabel) Constructs a Version object from a String representation. |
Method Summary | |
---|---|
int |
compareTo(Version other) Compare this version object with another version object. |
boolean |
equals(java.lang.Object other) Compare this version object with another version object for equality. |
int |
hashCode() |
static boolean |
isValid(java.lang.String versionLabel) Determines whether the specified version label is valid. |
java.lang.String |
toCanonicalString() Get this version number as a canonicalized string. |
int[] |
toIntArray() Converts this Version to an int array. |
java.lang.String |
toString() Get this version number as a string. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Version(java.lang.String versionLabel) throws java.lang.NumberFormatException
versionLabel
- a String representation of a version number. This must start with an integer and contain only integers and periods.java.lang.NumberFormatException
- if the specified version label contains non-numeric characters other than periods.Method Detail |
---|
public static boolean isValid(java.lang.String versionLabel)
versionLabel
- a version label.java.lang.NullPointerException
- if versionLabel is null.public int[] toIntArray()
public int compareTo(Version other)
compareTo
in interface java.lang.Comparable<Version>
other
- another instance of Version.public java.lang.String toString()
toString
in class java.lang.Object
toCanonicalString()
public java.lang.String toCanonicalString()
toString()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- another instance of Version.public int hashCode()
hashCode
in class java.lang.Object
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |