Record Class MilestoneData
java.lang.Object
java.lang.Record
megamek.common.util.milestoneReleaseInformation.MilestoneData
- Record Components:
label- Descriptive label for the milestone. Should correspond to the tail of the release's GitHub Url.version- Version associated with the milestone.useFallbackHyperlink-trueif the url fetchers should all return their project releases page, instead of a page specific to that Milestone.
public record MilestoneData(String label, Version version, boolean useFallbackHyperlink)
extends Record
Represents data about a milestone relating to MegaMek, MegaMekLab, or MekHQ releases.
Each MilestoneData instance contains a descriptive label, a Version object, and URLs pointing
to the relevant release pages for each application. If any URL is null or blank, it is assigned a default
value corresponding to each application's 'releases' page.
- Since:
- 0.50.07
-
Constructor Summary
ConstructorsConstructorDescriptionMilestoneData(String label, Version version, boolean useFallbackHyperlink) Creates an instance of aMilestoneDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the full URL for the MekHQ release associated with this milestone.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseFallbackHyperlinkrecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
MilestoneData
Creates an instance of aMilestoneDatarecord class.- Parameters:
label- the value for thelabelrecord componentversion- the value for theversionrecord componentuseFallbackHyperlink- the value for theuseFallbackHyperlinkrecord component
-
-
Method Details
-
getMegaMekUrl
Deprecated, for removal: This API element is subject to removal in a future version.Returns the full URL for the MegaMek release associated with this milestone.The URL is constructed using predefined URL segments and the MegaMek project name, along with the stored MegaMek URL.
- Returns:
- a complete URL string for the MegaMek release page.
- Since:
- 0.50.07
-
getMegaMekLabUrl
Deprecated, for removal: This API element is subject to removal in a future version.Returns the full URL for the MegaMekLab release associated with this milestone.The URL is constructed dynamically using predefined URL segments, the MegaMekLab project name, and the
labelparameter.- Returns:
- a complete URL string for the MegaMekLab release page.
- Since:
- 0.50.07
-
getMekHQUrl
Returns the full URL for the MekHQ release associated with this milestone.The URL is dynamically constructed using predefined URL segments, the MekHQ project name, and the
labelparameter.- Returns:
- a complete URL string for the MekHQ release page.
- Since:
- 0.50.07
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
useFallbackHyperlink
public boolean useFallbackHyperlink()Returns the value of theuseFallbackHyperlinkrecord component.- Returns:
- the value of the
useFallbackHyperlinkrecord component
-