Record Class TextHandlers.Impl
java.lang.Object
java.lang.Record
dev.sympho.modular_commands.api.command.handler.TextHandlers.Impl
- Record Components:
invocation- The invocation handler to use.result- The result handlers to use.
- All Implemented Interfaces:
Handlers,InteractionHandlers,MessageHandlers,SlashHandlers,TextHandlers
- Enclosing interface:
- TextHandlers
public static record TextHandlers.Impl(InvocationHandler<CommandContext> invocation, List<? extends ResultHandler<CommandContext>> result)
extends Record
implements TextHandlers
A record-based implementation.
- Since:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.sympho.modular_commands.api.command.handler.TextHandlers
TextHandlers.Impl -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionImpl(InvocationHandler<CommandContext> invocation, List<? extends ResultHandler<CommandContext>> result) Creates an instance of aImplrecord 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.Returns the value of theinvocationrecord component.List<? extends ResultHandler<CommandContext>>result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Impl
public Impl(InvocationHandler<CommandContext> invocation, List<? extends ResultHandler<CommandContext>> result) Creates an instance of aImplrecord class.- Parameters:
invocation- the value for theinvocationrecord componentresult- the value for theresultrecord component
-
-
Method Details
-
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). -
invocation
Returns the value of theinvocationrecord component.- Specified by:
invocationin interfaceHandlers- Specified by:
invocationin interfaceInteractionHandlers- Specified by:
invocationin interfaceMessageHandlers- Specified by:
invocationin interfaceSlashHandlers- Specified by:
invocationin interfaceTextHandlers- Returns:
- the value of the
invocationrecord component
-
result
Returns the value of theresultrecord component.- Specified by:
resultin interfaceHandlers- Specified by:
resultin interfaceInteractionHandlers- Specified by:
resultin interfaceMessageHandlers- Specified by:
resultin interfaceSlashHandlers- Specified by:
resultin interfaceTextHandlers- Returns:
- the value of the
resultrecord component
-