Record Class HttpUtil.PluginVersion
java.lang.Object
java.lang.Record
kr.toxicity.model.api.util.HttpUtil.PluginVersion
- Record Components:
id- idversionNumber- numberversionType- typeversions- game versionsloaders- loaders
- Enclosing class:
HttpUtil
-
Constructor Summary
ConstructorsConstructorDescriptionPluginVersion(@NotNull String id, @NotNull org.semver4j.Semver versionNumber, @NotNull String versionType, @NotNull Set<MinecraftVersion> versions, @NotNull Set<String> loaders) Creates an instance of aPluginVersionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringid()Returns the value of theidrecord component.booleanChecks this version is same platform with running platformloaders()Returns the value of theloadersrecord component.final StringtoString()Returns a string representation of this record class.@NotNull net.kyori.adventure.text.ComponentCreates a text component with URL@NotNull org.semver4j.SemverReturns the value of theversionNumberrecord component.@NotNull Set<MinecraftVersion> versions()Returns the value of theversionsrecord component.@NotNull StringReturns the value of theversionTyperecord component.
-
Constructor Details
-
PluginVersion
public PluginVersion(@NotNull @NotNull String id, @NotNull @NotNull org.semver4j.Semver versionNumber, @NotNull @NotNull String versionType, @NotNull @NotNull Set<MinecraftVersion> versions, @NotNull @NotNull Set<String> loaders) Creates an instance of aPluginVersionrecord class.- Parameters:
id- the value for theidrecord componentversionNumber- the value for theversionNumberrecord componentversionType- the value for theversionTyperecord componentversions- the value for theversionsrecord componentloaders- the value for theloadersrecord component
-
-
Method Details
-
toURLComponent
@NotNull public @NotNull net.kyori.adventure.text.Component toURLComponent()Creates a text component with URL- Returns:
- text component
-
isSamePlatform
public boolean isSamePlatform()Checks this version is same platform with running platform- Returns:
- is same platform
-
toString
-
hashCode
-
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). -
id
-
versionNumber
@NotNull @SerializedName("version_number") public @NotNull org.semver4j.Semver versionNumber()Returns the value of theversionNumberrecord component.- Returns:
- the value of the
versionNumberrecord component
-
versionType
Returns the value of theversionTyperecord component.- Returns:
- the value of the
versionTyperecord component
-
versions
-
loaders
-