Record Class UpdateChecker.FetchedUpdateData

java.lang.Object
java.lang.Record
me.tayebyassine.homestead.util.https.UpdateChecker.FetchedUpdateData
Record Components:
current - the version currently running
latest - the latest version available from the repository, or null if the fetch failed
errored - true if an IOException occurred while fetching
Enclosing class:
UpdateChecker

public static record UpdateChecker.FetchedUpdateData(String current, String latest, boolean errored) extends Record
Holds the result of an update check against the remote repository.
  • Constructor Details

    • FetchedUpdateData

      public FetchedUpdateData(String current, String latest, boolean errored)
      Creates an instance of a FetchedUpdateData record class.
      Parameters:
      current - the value for the current record component
      latest - the value for the latest record component
      errored - the value for the errored record component
  • Method Details

    • 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
    • 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 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.
    • current

      public String current()
      Returns the value of the current record component.
      Returns:
      the value of the current record component
    • latest

      public String latest()
      Returns the value of the latest record component.
      Returns:
      the value of the latest record component
    • errored

      public boolean errored()
      Returns the value of the errored record component.
      Returns:
      the value of the errored record component