Package net.minestom.server.entity
Record Class MetadataDef.Entry.BitMask
java.lang.Object
java.lang.Record
net.minestom.server.entity.MetadataDef.Entry.BitMask
- All Implemented Interfaces:
MetadataDef.Entry<Boolean>
- Enclosing interface:
MetadataDef.Entry<T>
public static record MetadataDef.Entry.BitMask(int index, byte bitMask, Boolean defaultValue)
extends Record
implements MetadataDef.Entry<Boolean>
-
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
bitMask()
Returns the value of thebitMask
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.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
BitMask
Creates an instance of aBitMask
record class.- Parameters:
index
- the value for theindex
record componentbitMask
- the value for thebitMask
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<Boolean>
- Returns:
- the value of the
index
record component
-
bitMask
public byte bitMask()Returns the value of thebitMask
record component.- Returns:
- the value of the
bitMask
record component
-
defaultValue
Returns the value of thedefaultValue
record component.- Specified by:
defaultValue
in interfaceMetadataDef.Entry<Boolean>
- Returns:
- the value of the
defaultValue
record component
-