Class Version
java.lang.Object
org.cqframework.cql.cql2elm.model.Version
- All Implemented Interfaces:
Comparable<Version>
Implements a comparable version for use in comparing CQL artifact versions.
Supports versions specified in filename strings according to the following pattern:
[v]{{major}}(.|-){{minor}}(.|-){{patch}}(.|-){{build}}
where major, minor, and patch are all required to be unsigned integers, and build is any string
Examples:
1.0.0 -> major: 1, minor: 0, patch: 0
v1-0-0 -> major: 1, minor: 0, patch: 0
v1-0-0-SNAPSHOT -> major: 1, minor: 0, patch: 0, build: snapshot
NOTE: Deliberately not using Apache ComparableVersion to a) avoid dependencies on Maven and b) allow for more
flexible version strings used by MAT file naming conventions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleancompatibleWith(Version that) booleaninthashCode()booleanbooleanisComparable(int level) booleanmatchStrictly(Version that) toString()
-
Constructor Details
-
Version
-
-
Method Details
-
getMajorVersion
-
getMinorVersion
-
getPatchVersion
-
getBuildVersion
-
compareTo
- Specified by:
compareToin interfaceComparable<Version>
-
compatibleWith
-
matchStrictly
-
isComparable
public boolean isComparable(int level) -
isComparable
public boolean isComparable() -
equals
-
hashCode
public int hashCode() -
toString
-