Record Class ValidSyntaxHolder
java.lang.Object
java.lang.Record
net.minestom.server.command.builder.parser.ValidSyntaxHolder
public record ValidSyntaxHolder(String commandString, CommandSyntax syntax, Map<Argument<?>,ArgumentParser.ArgumentResult> argumentResults)
extends Record
Holds the data of a validated syntax.
-
Constructor Summary
ConstructorDescriptionValidSyntaxHolder
(String commandString, CommandSyntax syntax, Map<Argument<?>, ArgumentParser.ArgumentResult> argumentResults) Creates an instance of aValidSyntaxHolder
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentResults
record component.Returns the value of thecommandString
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.syntax()
Returns the value of thesyntax
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ValidSyntaxHolder
public ValidSyntaxHolder(String commandString, CommandSyntax syntax, Map<Argument<?>, ArgumentParser.ArgumentResult> argumentResults) Creates an instance of aValidSyntaxHolder
record class.- Parameters:
commandString
- the value for thecommandString
record componentsyntax
- the value for thesyntax
record componentargumentResults
- the value for theargumentResults
record 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)
. -
commandString
Returns the value of thecommandString
record component.- Returns:
- the value of the
commandString
record component
-
syntax
Returns the value of thesyntax
record component.- Returns:
- the value of the
syntax
record component
-
argumentResults
Returns the value of theargumentResults
record component.- Returns:
- the value of the
argumentResults
record component
-