Package io.github.smootheez.modrinth
Record Class GameVersionTag
java.lang.Object
java.lang.Record
io.github.smootheez.modrinth.GameVersionTag
- Record Components:
version- the human-readable version string (e.g., "1.20.1")versionType- classification of the version (e.g., "release", "snapshot", "beta"); mapped from the JSON fieldversion_typedate- the release date of the version in ISO-8601 formatmajor- whether this version is marked as a major update
public record GameVersionTag(String version, String versionType, String date, boolean major)
extends Record
Represents a game version entry retrieved from an external API such as Modrinth.
Each version includes metadata describing its release type, publication date, and whether it is considered a major release. This information is typically used to determine compatibility or filter target versions during publishing.
-
Constructor Summary
ConstructorsConstructorDescriptionGameVersionTag(String version, String versionType, String date, boolean major) Creates an instance of aGameVersionTagrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondate()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmajor()Returns the value of themajorrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.Returns the value of theversionTyperecord component.
-
Constructor Details
-
GameVersionTag
Creates an instance of aGameVersionTagrecord class.- Parameters:
version- the value for theversionrecord componentversionType- the value for theversionTyperecord componentdate- the value for thedaterecord componentmajor- the value for themajorrecord component
-
-
Method Details
-
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 '=='. -
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
versionType
Returns the value of theversionTyperecord component.- Returns:
- the value of the
versionTyperecord component
-
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
major
public boolean major()Returns the value of themajorrecord component.- Returns:
- the value of the
majorrecord component
-