Package dev.galasa
Class ProductVersion
java.lang.Object
dev.galasa.ProductVersion
- All Implemented Interfaces:
Comparable<ProductVersion>
A ProductVersion represents a {version}.{release}.{modification} level way of semantic numbering.
where {version} {release} and {modification} are integers, joined with a period.
This class allows you to create versions which can then be compared.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProductVersion
(int version, int release, int modification) ProductVersion
(ProductVersion productVersion) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(@NotNull ProductVersion o) boolean
int
hashCode()
boolean
isEarlierThan
(@NotNull ProductVersion o) boolean
isLaterThan
(@NotNull ProductVersion o) m
(int modification) Note.static ProductVersion
r
(int release) Note.toString()
static ProductVersion
v
(int version) Note.
-
Field Details
-
patternVersion
-
-
Constructor Details
-
ProductVersion
- Parameters:
version
-release
-modification
-- Throws:
ManagerException
- When any of the numbers are negative.
-
ProductVersion
-
-
Method Details
-
v
Note. Using this method is less efficient than using the class constructor.- Parameters:
version
- A version number. Negative numbers are treated as 0.- Returns:
- A ProductVersion which has the specified version, but the release and modification are zero.
-
r
Note. Using this method is less efficient than using the class constructor.- Parameters:
version
- A version number. Negative numbers are treated as 0.- Returns:
- A ProductVersion which has the the specified release
-
m
Note. Using this method is less efficient than using the class constructor.- Parameters:
version
- A version number. Negative numbers are treated as 0.- Returns:
- A ProductVersion which has the the specified modification level
-
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<ProductVersion>
-
isEarlierThan
-
isLaterThan
-
parse
- Throws:
ManagerException
-