Record Class CommandContextImpl<T>
java.lang.Object
java.lang.Record
de.kentoj.kencommandapi.internal.CommandContextImpl<T>
- All Implemented Interfaces:
CommandContext<T>
public record CommandContextImpl<T>(T sender, Map<String, CommandArgument<T,?>> parsedArguments)
extends Record
implements CommandContext<T>
-
Constructor Summary
ConstructorsConstructorDescriptionCommandContextImpl(T sender, Map<String, CommandArgument<T, ?>> parsedArguments) Creates an instance of aCommandContextImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.<V> CommandArgument<T, V> final inthashCode()Returns a hash code value for this object.Map<String, CommandArgument<T, ?>> Returns the value of theparsedArgumentsrecord component.sender()Returns the value of thesenderrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface CommandContext
getArg, getArg, getParsedArgument
-
Constructor Details
-
CommandContextImpl
Creates an instance of aCommandContextImplrecord class.- Parameters:
sender- the value for thesenderrecord componentparsedArguments- the value for theparsedArgumentsrecord component
-
-
Method Details
-
getParsedArgument
- Specified by:
getParsedArgumentin interfaceCommandContext<T>
-
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). -
sender
Returns the value of thesenderrecord component.- Specified by:
senderin interfaceCommandContext<T>- Returns:
- the value of the
senderrecord component
-
parsedArguments
Returns the value of theparsedArgumentsrecord component.- Specified by:
parsedArgumentsin interfaceCommandContext<T>- Returns:
- the value of the
parsedArgumentsrecord component
-