Package lu.kbra.modelizer_next.common
Record Class VersionComparator.ParsedVersion
java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.common.VersionComparator.ParsedVersion
- Record Components:
numbers- values for numbersupdateChannel- update channel value used by the operationbuildNumber- numeric build number value
- Enclosing class:
VersionComparator
public static record VersionComparator.ParsedVersion(List<Integer> numbers, UpdateChannel updateChannel, long buildNumber)
extends Record
Immutable value object for parsed version data.
-
Constructor Summary
ConstructorsConstructorDescriptionParsedVersion(List<Integer> numbers, UpdateChannel updateChannel, long buildNumber) Creates an instance of aParsedVersionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thebuildNumberrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.numbers()Returns the value of thenumbersrecord component.final StringtoString()Builds a debug string for this parsed version.Returns the value of theupdateChannelrecord component.
-
Constructor Details
-
ParsedVersion
Creates an instance of aParsedVersionrecord class.- Parameters:
numbers- the value for thenumbersrecord componentupdateChannel- the value for theupdateChannelrecord componentbuildNumber- the value for thebuildNumberrecord component
-
-
Method Details
-
toString
Builds a debug string for this parsed version. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
numbers
Returns the value of thenumbersrecord component.- Returns:
- the value of the
numbersrecord component
-
updateChannel
Returns the value of theupdateChannelrecord component.- Returns:
- the value of the
updateChannelrecord component
-
buildNumber
public long buildNumber()Returns the value of thebuildNumberrecord component.- Returns:
- the value of the
buildNumberrecord component
-