Package kr.toxicity.model.api.pack
Record Class PackMeta.Pack
java.lang.Object
java.lang.Record
kr.toxicity.model.api.pack.PackMeta.Pack
- Record Components:
packFormat- the pack format versiondescription- the pack descriptionsupportedFormats- the range of supported formatsminFormat- the minimum supported format (>= 1.21.9)maxFormat- the maximum supported format
- Enclosing class:
PackMeta
public static record PackMeta.Pack(int packFormat, @NotNull String description, @NotNull PackMeta.VersionRange supportedFormats, @NotNull PackMeta.PackVersion minFormat, @NotNull PackMeta.PackVersion maxFormat)
extends Record
Represents the 'pack' section of the metadata.
- Since:
- 1.15.2
-
Constructor Summary
ConstructorsConstructorDescriptionPack(int packFormat, @NotNull String description, @NotNull PackMeta.VersionRange supportedFormats, @NotNull PackMeta.PackVersion minFormat, @NotNull PackMeta.PackVersion maxFormat) Creates an instance of aPackrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull PackMeta.PackVersionReturns the value of themaxFormatrecord component.@NotNull PackMeta.PackVersionReturns the value of theminFormatrecord component.intReturns the value of thepackFormatrecord component.@NotNull PackMeta.VersionRangeReturns the value of thesupportedFormatsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Pack
public Pack(int packFormat, @NotNull @NotNull String description, @NotNull @NotNull PackMeta.VersionRange supportedFormats, @NotNull @NotNull PackMeta.PackVersion minFormat, @NotNull @NotNull PackMeta.PackVersion maxFormat) Creates an instance of aPackrecord class.- Parameters:
packFormat- the value for thepackFormatrecord componentdescription- the value for thedescriptionrecord componentsupportedFormats- the value for thesupportedFormatsrecord componentminFormat- the value for theminFormatrecord componentmaxFormat- the value for themaxFormatrecord 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 '=='. -
packFormat
@SerializedName("pack_format") public int packFormat()Returns the value of thepackFormatrecord component.- Returns:
- the value of the
packFormatrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
supportedFormats
@SerializedName("supported_formats") @NotNull public @NotNull PackMeta.VersionRange supportedFormats()Returns the value of thesupportedFormatsrecord component.- Returns:
- the value of the
supportedFormatsrecord component
-
minFormat
Returns the value of theminFormatrecord component.- Returns:
- the value of the
minFormatrecord component
-
maxFormat
Returns the value of themaxFormatrecord component.- Returns:
- the value of the
maxFormatrecord component
-