Record Class EnumProperty<E extends Enum<E>>
java.lang.Object
java.lang.Record
org.geysermc.geyser.entity.properties.type.EnumProperty<E>
- All Implemented Interfaces:
org.geysermc.geyser.api.entity.property.GeyserEntityProperty<E>,org.geysermc.geyser.api.entity.property.type.GeyserEnumEntityProperty<E>,AbstractEnumProperty<E>,PropertyType<E,org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty>
-
Field Summary
Fields inherited from interface org.geysermc.geyser.entity.properties.type.AbstractEnumProperty
VALUE_VALIDATION_REGEX -
Constructor Summary
ConstructorsConstructorDescriptionEnumProperty(org.geysermc.geyser.api.util.Identifier identifier, Class<E> enumClass, E defaultValue) Creates an instance of aEnumPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedefaultValuerecord component.Returns the value of theenumClassrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.geysermc.geyser.api.util.IdentifierReturns the value of theidentifierrecord component.intfinal StringtoString()Returns a string representation of this record class.values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.geyser.entity.properties.type.AbstractEnumProperty
createValue, defaultValue, nbtMap, validateAllValuesMethods inherited from interface org.geysermc.geyser.entity.properties.type.PropertyType
apply
-
Constructor Details
-
EnumProperty
public EnumProperty(org.geysermc.geyser.api.util.Identifier identifier, Class<E> enumClass, E defaultValue) Creates an instance of aEnumPropertyrecord class.- Parameters:
identifier- the value for theidentifierrecord componentenumClass- the value for theenumClassrecord componentdefaultValue- the value for thedefaultValuerecord component
-
-
Method Details
-
values
-
allBedrockValues
- Specified by:
allBedrockValuesin interfaceAbstractEnumProperty<E extends Enum<E>>
-
indexOf
- Specified by:
indexOfin interfaceAbstractEnumProperty<E extends Enum<E>>
-
defaultIndex
public int defaultIndex()- Specified by:
defaultIndexin interfaceAbstractEnumProperty<E extends Enum<E>>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
identifier
public org.geysermc.geyser.api.util.Identifier identifier()Returns the value of theidentifierrecord component. -
enumClass
Returns the value of theenumClassrecord component.- Returns:
- the value of the
enumClassrecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.
-