Record Class HttpUtil.PluginVersion

java.lang.Object
java.lang.Record
kr.toxicity.model.api.util.HttpUtil.PluginVersion
Record Components:
versionNumber - number
versionType - type
versions - game versions
Enclosing class:
HttpUtil

public static record HttpUtil.PluginVersion(@NotNull com.vdurmont.semver4j.Semver versionNumber, @NotNull String versionType, @NotNull List<MinecraftVersion> versions) extends Record
Plugin version
  • Constructor Details

    • PluginVersion

      public PluginVersion(@NotNull @NotNull com.vdurmont.semver4j.Semver versionNumber, @NotNull @NotNull String versionType, @NotNull @NotNull List<MinecraftVersion> versions)
      Creates an instance of a PluginVersion record class.
      Parameters:
      versionNumber - the value for the versionNumber record component
      versionType - the value for the versionType record component
      versions - the value for the versions record component
  • Method Details

    • toURLComponent

      @NotNull public @NotNull net.kyori.adventure.text.Component toURLComponent()
      Creates a text component with URL
      Returns:
      text component
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • versionNumber

      @NotNull @SerializedName("version_number") public @NotNull com.vdurmont.semver4j.Semver versionNumber()
      Returns the value of the versionNumber record component.
      Returns:
      the value of the versionNumber record component
    • versionType

      @NotNull @SerializedName("version_type") public @NotNull String versionType()
      Returns the value of the versionType record component.
      Returns:
      the value of the versionType record component
    • versions

      @NotNull @SerializedName("game_versions") public @NotNull List<MinecraftVersion> versions()
      Returns the value of the versions record component.
      Returns:
      the value of the versions record component