Class ComparableVersion
java.lang.Object
org.exoplatform.commons.version.util.ComparableVersion
- All Implemented Interfaces:
Comparable<ComparableVersion>
Generic implementation of version comparison.
Features:
- mixing of '
-' (dash) and '.' (dot) separators, - transition between characters and digits also constitutes a separator:
1.0alpha1 => [1, 0, alpha, 1] - unlimited number of version components,
- version components in the text can be digits or strings,
- strings are checked for well-known qualifiers and the qualifier ordering is used for version ordering.
Well-known qualifiers (case insensitive) are:
snapshotalphaorabetaorbmilestoneormrcorcr(the empty string)orgaorfinalsp
- a dash usually precedes a qualifier, and is always less important than something preceded with a dot.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleaninthashCode()final voidparseVersion(String version) toString()
-
Constructor Details
-
ComparableVersion
-
-
Method Details
-
parseVersion
-
compareTo
- Specified by:
compareToin interfaceComparable<ComparableVersion>
-
toString
-
equals
-
hashCode
public int hashCode()
-