Package kr.toxicity.model.api.pack
Record Class PackByte
java.lang.Object
java.lang.Record
kr.toxicity.model.api.pack.PackByte
- All Implemented Interfaces:
Comparable<PackByte>
public record PackByte(@NotNull PackPath path, byte[] bytes)
extends Record
implements Comparable<PackByte>
-
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
-
PackByte
Creates an instance of aPackByterecord class.- Parameters:
path- the value for thepathrecord componentbytes- the value for thebytesrecord component
-
-
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
-