Record Class ChatInputResponse
java.lang.Object
java.lang.Record
io.github.lucfr1746.llibrary.chatinput.response.ChatInputResponse
A class that represents the response of an input prompt.
It contains the status and the value.
-
Constructor Summary
ConstructorsConstructorDescriptionChatInputResponse
(InputStatus status, String value) Creates an instance of aChatInputResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull InputStatus
status()
Returns the status of an input prompt.final String
toString()
Returns a string representation of this record class.@NotNull String
value()
Returns the string value of an input prompt.
-
Constructor Details
-
ChatInputResponse
Creates an instance of aChatInputResponse
record class.- Parameters:
status
- the value for thestatus
record componentvalue
- the value for thevalue
record component
-
-
Method Details
-
status
Returns the status of an input prompt.- Returns:
- the status
-
value
Returns the string value of an input prompt.- Returns:
- the value
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
.
-