Record Class KeywordDefinition
java.lang.Object
java.lang.Record
fr.dreamin.dreamvoice.api.speech.model.KeywordDefinition
- Record Components:
id- unique key of the keyword actionwords- list of words or phrases that trigger this keywordpermission- optional permission required by the player to trigger
-
Constructor Summary
ConstructorsConstructorDescriptionKeywordDefinition(@NotNull String id, @NotNull List<String> words, @Nullable String permission) Creates an instance of aKeywordDefinitionrecord 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.@NotNull Stringid()Returns the value of theidrecord component.@Nullable StringReturns the value of thepermissionrecord component.final StringtoString()Returns a string representation of this record class.words()Returns the value of thewordsrecord component.
-
Constructor Details
-
KeywordDefinition
public KeywordDefinition(@NotNull @NotNull String id, @NotNull @NotNull List<String> words, @Nullable @Nullable String permission) Creates an instance of aKeywordDefinitionrecord class.- Parameters:
id- the value for theidrecord componentwords- the value for thewordsrecord componentpermission- the value for thepermissionrecord 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). -
id
-
words
-
permission
Returns the value of thepermissionrecord component.- Returns:
- the value of the
permissionrecord component
-