Package kr.toxicity.model.api.util
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
public static record HttpUtil.PluginVersion(@NotNull String id, @NotNull com.vdurmont.semver4j.Semver versionNumber, @NotNull String versionType, @NotNull Set<MinecraftVersion> versions, @NotNull Set<String> loaders)
extends Record
Plugin version
-
Constructor Summary
ConstructorsConstructorDescriptionPluginVersion(@NotNull String id, @NotNull com.vdurmont.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 com.vdurmont.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 com.vdurmont.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
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
versionNumber
@NotNull @SerializedName("version_number") public @NotNull com.vdurmont.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
Returns the value of theversionsrecord component.- Returns:
- the value of the
versionsrecord component
-
loaders
Returns the value of theloadersrecord component.- Returns:
- the value of the
loadersrecord component
-