Record Class VersionComparator.ParsedVersion

java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.common.VersionComparator.ParsedVersion
Record Components:
numbers - values for numbers
updateChannel - update channel value used by the operation
buildNumber - 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 Details

    • ParsedVersion

      public ParsedVersion(List<Integer> numbers, UpdateChannel updateChannel, long buildNumber)
      Creates an instance of a ParsedVersion record class.
      Parameters:
      numbers - the value for the numbers record component
      updateChannel - the value for the updateChannel record component
      buildNumber - the value for the buildNumber record component
  • Method Details

    • toString

      public final String toString()
      Builds a debug string for this parsed version.
      Specified by:
      toString in class Record
      Returns:
      a debug string for this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • numbers

      public List<Integer> numbers()
      Returns the value of the numbers record component.
      Returns:
      the value of the numbers record component
    • updateChannel

      public UpdateChannel updateChannel()
      Returns the value of the updateChannel record component.
      Returns:
      the value of the updateChannel record component
    • buildNumber

      public long buildNumber()
      Returns the value of the buildNumber record component.
      Returns:
      the value of the buildNumber record component