Record Class CommandArgumentImpl<T,V>
java.lang.Object
java.lang.Record
de.kentoj.kencommandapi.api.argument.CommandArgumentImpl<T,V>
- All Implemented Interfaces:
CommandArgument<T,V>
public record CommandArgumentImpl<T,V> (V value, CommandArgumentSpec<T,V> argument)
extends Record
implements CommandArgument<T,V>
-
Constructor Summary
ConstructorsConstructorDescriptionCommandArgumentImpl(V value, CommandArgumentSpec<T, V> argument) Creates an instance of aCommandArgumentImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionargument()Returns the value of theargumentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
CommandArgumentImpl
Creates an instance of aCommandArgumentImplrecord class.- Parameters:
value- the value for thevaluerecord componentargument- the value for theargumentrecord 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). -
value
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceCommandArgument<T,V> - Returns:
- the value of the
valuerecord component
-
argument
Returns the value of theargumentrecord component.- Specified by:
argumentin interfaceCommandArgument<T,V> - Returns:
- the value of the
argumentrecord component
-