Record Class CBVersion
java.lang.Object
java.lang.Record
com.io7m.cedarbridge.version.CBVersion
- Record Components:
major- The major versionminor- The minor versionpatch- The patch versionqualifier- The qualifier
- All Implemented Interfaces:
Comparable<CBVersion>, Formattable
public record CBVersion(int major, int minor, int patch, String qualifier)
extends Record
implements Comparable<CBVersion>, Formattable
A semantic version number.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.voidfinal inthashCode()Returns a hash code value for this object.intmajor()Returns the value of themajorrecord component.intminor()Returns the value of theminorrecord component.intpatch()Returns the value of thepatchrecord component.Returns the value of thequalifierrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CBVersion
A semantic version number.- Parameters:
major- The major versionminor- The minor versionpatch- The patch versionqualifier- The qualifier
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<CBVersion>
-
formatTo
- Specified by:
formatToin interfaceFormattable
-
toString
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
major
-
minor
-
patch
-
qualifier
-