Package kr.toxicity.model.api.pack
Record Class PackByte
java.lang.Object
java.lang.Record
kr.toxicity.model.api.pack.PackByte
- Record Components:
path- the path of the resourcebytes- the binary content of the resource
- All Implemented Interfaces:
Comparable<PackByte>
public record PackByte(@NotNull PackPath path, byte[] bytes)
extends Record
implements Comparable<PackByte>
Represents a raw byte array associated with a specific pack path.
This record is used to store the binary content of a resource within a resource pack.
It implements Comparable to allow sorting based on the path.
- Since:
- 1.15.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the value of thebytesrecord component.intbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@NotNull PackPathpath()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
compareTo
- Specified by:
compareToin interfaceComparable<PackByte>
-
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. -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
bytes
public byte[] bytes()Returns the value of thebytesrecord component.- Returns:
- the value of the
bytesrecord component
-