Record Class ConfigField.StringField
java.lang.Object
java.lang.Record
com.botwithus.bot.api.config.ConfigField.StringField
- All Implemented Interfaces:
ConfigField
- Enclosing interface:
ConfigField
public static record ConfigField.StringField(String key, String label, String value)
extends Record
implements ConfigField
A free-text string-valued field.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ConfigField
ConfigField.BoolField, ConfigField.ChoiceField, ConfigField.IntField, ConfigField.ItemIdField, ConfigField.StringField -
Constructor Summary
ConstructorsConstructorDescriptionStringField(String key, String label, String value) Creates an instance of aStringFieldrecord 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.value()Returns the value of thevaluerecord component.Methods inherited from interface ConfigField
defaultAsString
-
Constructor Details
-
StringField
-
-
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
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-