Package net.minestom.server.entity
Record Class MetadataDef.Entry.ByteMask
java.lang.Object
java.lang.Record
net.minestom.server.entity.MetadataDef.Entry.ByteMask
- All Implemented Interfaces:
MetadataDef.Entry<Byte>
- Enclosing interface:
MetadataDef.Entry<T>
public static record MetadataDef.Entry.ByteMask(int index, byte byteMask, int offset, Byte defaultValue)
extends Record
implements MetadataDef.Entry<Byte>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.entity.MetadataDef.Entry
MetadataDef.Entry.BitMask, MetadataDef.Entry.ByteMask, MetadataDef.Entry.Index<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte
byteMask()
Returns the value of thebyteMask
record component.Returns the value of thedefaultValue
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
index()
Returns the value of theindex
record component.int
offset()
Returns the value of theoffset
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ByteMask
Creates an instance of aByteMask
record class.- Parameters:
index
- the value for theindex
record componentbyteMask
- the value for thebyteMask
record componentoffset
- the value for theoffset
record componentdefaultValue
- the value for thedefaultValue
record 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 '=='. -
index
public int index()Returns the value of theindex
record component.- Specified by:
index
in interfaceMetadataDef.Entry<Byte>
- Returns:
- the value of the
index
record component
-
byteMask
public byte byteMask()Returns the value of thebyteMask
record component.- Returns:
- the value of the
byteMask
record component
-
offset
public int offset()Returns the value of theoffset
record component.- Returns:
- the value of the
offset
record component
-
defaultValue
Returns the value of thedefaultValue
record component.- Specified by:
defaultValue
in interfaceMetadataDef.Entry<Byte>
- Returns:
- the value of the
defaultValue
record component
-