Record Class ScriptConfig
java.lang.Object
java.lang.Record
com.botwithus.bot.api.config.ScriptConfig
- Record Components:
values- raw key/value map; defensively copied by the compact constructor
Immutable snapshot of a script's configuration values.
Passed to
BotScript.onConfigUpdate(ScriptConfig).-
Constructor Summary
ConstructorsConstructorDescriptionScriptConfig(Map<String, String> values) Creates an instance of aScriptConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionasMap()Returns an unmodifiable view of the raw values.final booleanIndicates whether some other object is "equal to" this one.booleangetBoolean(String key, boolean defaultValue) intFalls back to default if absent or unparseable.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
ScriptConfig
-
-
Method Details
-
getInt
Falls back to default if absent or unparseable. -
getString
-
getBoolean
-
asMap
-
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). -
values
-