Record Class MetadataDef.Entry.Index<T extends @UnknownNullability Object>
java.lang.Object
java.lang.Record
net.minestom.server.entity.MetadataDef.Entry.Index<T>
- All Implemented Interfaces:
MetadataDef.Entry<T>
- Enclosing interface:
MetadataDef.Entry<T extends @UnknownNullability Object>
public static record MetadataDef.Entry.Index<T extends @UnknownNullability Object>(int index, Function<T extends @UnknownNullability Object, Metadata.Entry<T extends @UnknownNullability Object>> function, T extends @UnknownNullability Object defaultValue)
extends Record
implements MetadataDef.Entry<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface MetadataDef.Entry
MetadataDef.Entry.BitMask, MetadataDef.Entry.ByteMask, MetadataDef.Entry.Index<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.Function<T, Metadata.Entry<T>> function()Returns the value of thefunctionrecord component.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Index
Creates an instance of aIndexrecord class.- Parameters:
index- the value for theindexrecord componentfunction- the value for thefunctionrecord componentdefaultValue- the value for thedefaultValuerecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
index
public int index()Returns the value of theindexrecord component.- Specified by:
indexin interfaceMetadataDef.Entry<T extends @UnknownNullability Object>- Returns:
- the value of the
indexrecord component
-
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Specified by:
defaultValuein interfaceMetadataDef.Entry<T extends @UnknownNullability Object>- Returns:
- the value of the
defaultValuerecord component
-