Record Class CommandFailureArgumentExtra
java.lang.Object
java.lang.Record
dev.sympho.modular_commands.api.command.result.CommandFailureArgumentExtra
- Record Components:
args- The unexpected arguments.
- All Implemented Interfaces:
CommandFailure,CommandFailureArgument,CommandFailureMessage,CommandResult
public record CommandFailureArgumentExtra(List<String> args)
extends Record
implements CommandFailureArgument
Failure result due to one or more argument being provided where one wasn't expected.
- Since:
- 1.0
- Version:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aCommandFailureArgumentExtrarecord class. -
Method Summary
Modifier and TypeMethodDescriptionargs()Returns the value of theargsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Retrieves the message to the user.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CommandFailureArgumentExtra
Creates an instance of aCommandFailureArgumentExtrarecord class.- Parameters:
args- the value for theargsrecord component
-
-
Method Details
-
message
Description copied from interface:CommandFailureMessageRetrieves the message to the user.- Specified by:
messagein interfaceCommandFailureMessage- Returns:
- The message to the user.
-
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). -
args
Returns the value of theargsrecord component.- Returns:
- the value of the
argsrecord component
-