Record Class ConfigField.ItemIdField
java.lang.Object
java.lang.Record
com.botwithus.bot.api.config.ConfigField.ItemIdField
- All Implemented Interfaces:
ConfigField
- Enclosing interface:
ConfigField
public static record ConfigField.ItemIdField(String key, String label, int value)
extends Record
implements ConfigField
An integer-valued field representing an item id.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ConfigField
ConfigField.BoolField, ConfigField.ChoiceField, ConfigField.IntField, ConfigField.ItemIdField, ConfigField.StringField -
Constructor Summary
ConstructorsConstructorDescriptionItemIdField(String key, String label, int value) Creates an instance of aItemIdFieldrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.label()Returns the value of thelabelrecord component.final StringtoString()Returns a string representation of this record class.intvalue()Returns the value of thevaluerecord component.Methods inherited from interface ConfigField
defaultAsString
-
Constructor Details
-
ItemIdField
-
-
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. -
key
Returns the value of thekeyrecord component.- Specified by:
keyin interfaceConfigField- Returns:
- the value of the
keyrecord component
-
label
Returns the value of thelabelrecord component.- Specified by:
labelin interfaceConfigField- Returns:
- the value of the
labelrecord component
-
value
public int value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-