Class UpdateResult

java.lang.Object
me.croabeast.common.updater.UpdateResult

public final class UpdateResult extends Object
Represents the outcome of an update check, encapsulating the comparison result between the locally installed plugin version and the fetched remote version.

Contains the reason code for the check, the local version, the fetched version, and any exception that occurred during the check.

See Also:
  • Method Details

    • requiresUpdate

      public boolean requiresUpdate()
      Determines whether the update check has identified a newer version available.
      Returns:
      true if
      invalid reference
      #getReason()
      is Reason.NEW_UPDATE; false otherwise.
    • getLatest

      public String getLatest()
      Returns the version string that should be considered the "latest" for this check.

      If an update is required, returns the fetched remote version; otherwise, returns the local version.

      Returns:
      the fetched version if an update is available, or the local version otherwise