Record Class CommandFailureArgumentMissing
java.lang.Object
java.lang.Record
dev.sympho.modular_commands.api.command.result.CommandFailureArgumentMissing
- Record Components:
parameter- The missing parameter.
- All Implemented Interfaces:
CommandFailure,CommandFailureArgument,CommandFailureMessage,CommandResult
public record CommandFailureArgumentMissing(Parameter<?> parameter)
extends Record
implements CommandFailureArgument
Failure result due to a required argument not being provided.
- Since:
- 1.0
- Version:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionCommandFailureArgumentMissing(Parameter<?> parameter) Creates an instance of aCommandFailureArgumentMissingrecord 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.message()Retrieves the message to the user.Parameter<?>Returns the value of theparameterrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CommandFailureArgumentMissing
Creates an instance of aCommandFailureArgumentMissingrecord class.- Parameters:
parameter- the value for theparameterrecord 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). -
parameter
Returns the value of theparameterrecord component.- Returns:
- the value of the
parameterrecord component
-