Record Class PackMeta.OverlayEntry

java.lang.Object
java.lang.Record
kr.toxicity.model.api.pack.PackMeta.OverlayEntry
Record Components:
formats - the range of formats this overlay applies to (removed in 1.21.9)
directory - the directory name for the overlay
minFormat - the minimum format (>= 1.21.9)
maxFormat - the maximum format
Enclosing class:
PackMeta

public static record PackMeta.OverlayEntry(@NotNull PackMeta.VersionRange formats, @NotNull String directory, @NotNull PackMeta.PackVersion minFormat, @NotNull PackMeta.PackVersion maxFormat) extends Record
Represents a single entry in the overlays list.
Since:
1.15.2
  • Constructor Details

    • OverlayEntry

      public OverlayEntry(@NotNull @NotNull PackMeta.VersionRange formats, @NotNull @NotNull String directory)
      Creates an overlay entry with a format range and directory.
      Parameters:
      formats - the format range
      directory - the directory
      Since:
      1.15.2
    • OverlayEntry

      public OverlayEntry(@NotNull @NotNull PackMeta.VersionRange formats, @NotNull @NotNull String directory, @NotNull @NotNull PackMeta.PackVersion minFormat, @NotNull @NotNull PackMeta.PackVersion maxFormat)
      Creates an instance of a OverlayEntry record class.
      Parameters:
      formats - the value for the formats record component
      directory - the value for the directory record component
      minFormat - the value for the minFormat record component
      maxFormat - the value for the maxFormat record component
  • Method Details

    • 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.
    • formats

      @NotNull public @NotNull PackMeta.VersionRange formats()
      Returns the value of the formats record component.
      Returns:
      the value of the formats record component
    • directory

      @NotNull public @NotNull String directory()
      Returns the value of the directory record component.
      Returns:
      the value of the directory record component
    • minFormat

      @SerializedName("min_format") @NotNull public @NotNull PackMeta.PackVersion minFormat()
      Returns the value of the minFormat record component.
      Returns:
      the value of the minFormat record component
    • maxFormat

      @SerializedName("max_format") @NotNull public @NotNull PackMeta.PackVersion maxFormat()
      Returns the value of the maxFormat record component.
      Returns:
      the value of the maxFormat record component