Record Class CLNVersion
java.lang.Object
java.lang.Record
com.io7m.calino.api.CLNVersion
- Record Components:
major- The major versionminor- The minor version
- All Implemented Interfaces:
Comparable<CLNVersion>
A version number.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCLNVersion(int major, int minor) Creates an instance of aCLNVersionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CLNVersion other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmajor()Returns the value of themajorrecord component.intminor()Returns the value of theminorrecord component.static CLNVersionParse a version string.toString()Returns a string representation of this record class.
-
Field Details
-
VALID_VERSION
The pattern that defines a valid version.
-
-
Constructor Details
-
CLNVersion
-
-
Method Details
-
parse
Parse a version string.- Parameters:
text- The text- Returns:
- A version string
- Throws:
ParseException- On parse errors
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<CLNVersion>
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
major
-
minor
-