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