Record Class ConversationManager.JoinResult.InstanceConstraintReached
java.lang.Object
java.lang.Record
org.teleight.teleightbots.conversation.ConversationManager.JoinResult.InstanceConstraintReached
- Record Components:
constraint- The constraint that was reached.reason- The reason for the constraint being reached.
- All Implemented Interfaces:
ConversationManager.JoinResult
- Enclosing interface:
ConversationManager.JoinResult
public static record ConversationManager.JoinResult.InstanceConstraintReached(@NotNull ConversationInstanceConstraint constraint, @NotNull String reason)
extends Record
implements ConversationManager.JoinResult
Represents a failed join operation due to a constraint being reached.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ConversationManager.JoinResult
ConversationManager.JoinResult.AlreadyInConversation, ConversationManager.JoinResult.ConversationNotFound, ConversationManager.JoinResult.InstanceConstraintReached, ConversationManager.JoinResult.Success -
Constructor Summary
ConstructorsConstructorDescriptionInstanceConstraintReached(@NotNull ConversationInstanceConstraint constraint, @NotNull String reason) Creates an instance of aInstanceConstraintReachedrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull ConversationInstanceConstraintReturns the value of theconstraintrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringreason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InstanceConstraintReached
public InstanceConstraintReached(@NotNull @NotNull ConversationInstanceConstraint constraint, @NotNull @NotNull String reason) Creates an instance of aInstanceConstraintReachedrecord class.- Parameters:
constraint- the value for theconstraintrecord componentreason- the value for thereasonrecord 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). -
constraint
Returns the value of theconstraintrecord component.- Returns:
- the value of the
constraintrecord component
-
reason
-