Package lu.kbra.modelizer_next.bootstrap
Record Class AvailableUpdate
java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.bootstrap.AvailableUpdate
- Record Components:
channel- update channel to querycurrentVersion- currently installed versionlatestVersion- latest version value used by the operationnotes- text value for notesdownloadUri- URI of the file to downloadreleasePageUri- URI to use
public record AvailableUpdate(UpdateChannel channel, VersionComparator.ParsedVersion currentVersion, VersionComparator.ParsedVersion latestVersion, String notes, URI downloadUri, URI releasePageUri)
extends Record
Update check result describing the current version, latest version, notes, and download location.
-
Constructor Summary
ConstructorsConstructorDescriptionAvailableUpdate(UpdateChannel channel, VersionComparator.ParsedVersion currentVersion, VersionComparator.ParsedVersion latestVersion, String notes, URI downloadUri, URI releasePageUri) Creates an instance of aAvailableUpdaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionchannel()Returns the value of thechannelrecord component.Returns the value of thecurrentVersionrecord component.Returns the value of thedownloadUrirecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks whether update available is enabled or applies.Returns the value of thelatestVersionrecord component.notes()Returns the value of thenotesrecord component.Returns the value of thereleasePageUrirecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AvailableUpdate
public AvailableUpdate(UpdateChannel channel, VersionComparator.ParsedVersion currentVersion, VersionComparator.ParsedVersion latestVersion, String notes, URI downloadUri, URI releasePageUri) Creates an instance of aAvailableUpdaterecord class.- Parameters:
channel- the value for thechannelrecord componentcurrentVersion- the value for thecurrentVersionrecord componentlatestVersion- the value for thelatestVersionrecord componentnotes- the value for thenotesrecord componentdownloadUri- the value for thedownloadUrirecord componentreleasePageUri- the value for thereleasePageUrirecord component
-
-
Method Details
-
isUpdateAvailable
public boolean isUpdateAvailable()Checks whether update available is enabled or applies.- Returns:
trueif update available is enabled or applies; otherwisefalse
-
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
channel
Returns the value of thechannelrecord component.- Returns:
- the value of the
channelrecord component
-
currentVersion
Returns the value of thecurrentVersionrecord component.- Returns:
- the value of the
currentVersionrecord component
-
latestVersion
Returns the value of thelatestVersionrecord component.- Returns:
- the value of the
latestVersionrecord component
-
notes
Returns the value of thenotesrecord component.- Returns:
- the value of the
notesrecord component
-
downloadUri
Returns the value of thedownloadUrirecord component.- Returns:
- the value of the
downloadUrirecord component
-
releasePageUri
Returns the value of thereleasePageUrirecord component.- Returns:
- the value of the
releasePageUrirecord component
-