Record Class VersionInfo

java.lang.Object
java.lang.Record
com.djrapitops.plan.version.VersionInfo
All Implemented Interfaces:
Comparable<VersionInfo>

public record VersionInfo(boolean release, VersionNumber version, String downloadUrl, String changeLogUrl) extends Record implements Comparable<VersionInfo>
Data class for reading version.txt in Github Repository.
  • Constructor Details

    • VersionInfo

      public VersionInfo(boolean release, String version, String downloadUrl, String changeLogUrl)
    • VersionInfo

      public VersionInfo(boolean release, VersionNumber version, String downloadUrl, String changeLogUrl)
      Creates an instance of a VersionInfo record class.
      Parameters:
      release - the value for the release record component
      version - the value for the version record component
      downloadUrl - the value for the downloadUrl record component
      changeLogUrl - the value for the changeLogUrl record component
  • Method Details

    • equals

      public 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 the compare method from their corresponding wrapper classes.
      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.
    • hashCode

      public 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
    • compareTo

      public int compareTo(VersionInfo o)
      Specified by:
      compareTo in interface Comparable<VersionInfo>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • release

      public boolean release()
      Returns the value of the release record component.
      Returns:
      the value of the release record component
    • version

      public VersionNumber version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • downloadUrl

      public String downloadUrl()
      Returns the value of the downloadUrl record component.
      Returns:
      the value of the downloadUrl record component
    • changeLogUrl

      public String changeLogUrl()
      Returns the value of the changeLogUrl record component.
      Returns:
      the value of the changeLogUrl record component