Record Class ConfigField.ChoiceField
java.lang.Object
java.lang.Record
com.botwithus.bot.api.config.ConfigField.ChoiceField
- All Implemented Interfaces:
ConfigField
- Enclosing interface:
ConfigField
-
Nested Class Summary
Nested classes/interfaces inherited from interface ConfigField
ConfigField.BoolField, ConfigField.ChoiceField, ConfigField.IntField, ConfigField.ItemIdField, ConfigField.StringField -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchoices()Returns the value of thechoicesrecord component.final 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.value()Returns the value of thevaluerecord component.Methods inherited from interface ConfigField
defaultAsString
-
Constructor Details
-
ChoiceField
Creates an instance of aChoiceFieldrecord class.- Parameters:
key- the value for thekeyrecord componentlabel- the value for thelabelrecord componentchoices- the value for thechoicesrecord componentvalue- the value for thevaluerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
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
-
choices
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-