Record Class DisplayArg.IntArg
java.lang.Object
java.lang.Record
dev.munebase.dynamickeybinds.model.DisplayArg.IntArg
- All Implemented Interfaces:
DisplayArg
- Enclosing interface:
- DisplayArg
An integer argument.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.munebase.dynamickeybinds.model.DisplayArg
DisplayArg.IntArg, DisplayArg.StringArg, DisplayArg.TranslationKeyArg -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intGet the type ID of this argument for serialization.getValue()Get the raw object value of this argument (String, Integer, etc).final inthashCode()Returns a hash code value for this object.net.minecraft.nbt.CompoundTagtoNbt()Serialize this DisplayArg to NBT.final StringtoString()Returns a string representation of this record class.intvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
IntArg
public IntArg(int value) Creates an instance of aIntArgrecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
toNbt
public net.minecraft.nbt.CompoundTag toNbt()Description copied from interface:DisplayArgSerialize this DisplayArg to NBT.- Specified by:
toNbtin interfaceDisplayArg
-
getTypeId
public int getTypeId()Description copied from interface:DisplayArgGet the type ID of this argument for serialization.- Specified by:
getTypeIdin interfaceDisplayArg
-
getValue
Description copied from interface:DisplayArgGet the raw object value of this argument (String, Integer, etc).- Specified by:
getValuein interfaceDisplayArg
-
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 with '=='. -
value
public int value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-