Package com.bc.ceres.core.runtime
Class Version
java.lang.Object
com.bc.ceres.core.runtime.Version
- All Implemented Interfaces:
Comparable
Represents a version identifier.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
int
boolean
int
getMajor()
int
getMicro()
int
getMinor()
int
getNumber
(int i) int
int
hashCode()
static Version
parseVersion
(String text) Parses a version text in the form{<number><sep>}[<qualifier>]
, where <sep> is one of '.', '-' or '_'.toString()
Returns the string representation of the version in the form{major}.{minor}.{micro}-{qualifier}
.
-
Constructor Details
-
Version
-
-
Method Details
-
parseVersion
Parses a version text in the form{<number><sep>}[<qualifier>]
, where <sep> is one of '.', '-' or '_'. If no number was found1.[<qualifier>]
is assumed, e.g. "M1", is the same as "1.0.0.M1".- Parameters:
text
- the text to parse- Returns:
- the version identifier
-
getNumberCount
public int getNumberCount() -
getNumber
public int getNumber(int i) -
getMajor
public int getMajor() -
getMinor
public int getMinor() -
getMicro
public int getMicro() -
getQualifier
-
compare
-
toString
Returns the string representation of the version in the form{major}.{minor}.{micro}-{qualifier}
. -
compareTo
- Specified by:
compareTo
in interfaceComparable
-
equals
-
hashCode
public int hashCode()
-