Record Class EntityAttribute.Modifier
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.protocol.model.EntityAttribute.Modifier
- Enclosing class:
- EntityAttribute
public static record EntityAttribute.Modifier(String id, String name, float amount, AttributeModifierOperation operation, AttributeOperands operand, boolean isSerializable)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionModifier(String id, String name, float amount, AttributeModifierOperation operation, AttributeOperands operand, boolean isSerializable) Creates an instance of aModifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanReturns the value of theisSerializablerecord component.name()Returns the value of thenamerecord component.operand()Returns the value of theoperandrecord component.Returns the value of theoperationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Modifier
public Modifier(String id, String name, float amount, AttributeModifierOperation operation, AttributeOperands operand, boolean isSerializable) Creates an instance of aModifierrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentamount- the value for theamountrecord componentoperation- the value for theoperationrecord componentoperand- the value for theoperandrecord componentisSerializable- the value for theisSerializablerecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
amount
public float amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
operand
Returns the value of theoperandrecord component.- Returns:
- the value of the
operandrecord component
-
isSerializable
public boolean isSerializable()Returns the value of theisSerializablerecord component.- Returns:
- the value of the
isSerializablerecord component
-