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
ConstructorsConstructorDescriptionValidSyntaxHolder(String commandString, CommandSyntax syntax, Map<Argument<?>, ArgumentParser.ArgumentResult> argumentResults) Creates an instance of aValidSyntaxHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentResultsrecord component.Returns the value of thecommandStringrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.syntax()Returns the value of thesyntaxrecord component.final StringtoString()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 aValidSyntaxHolderrecord class.- Parameters:
commandString- the value for thecommandStringrecord componentsyntax- the value for thesyntaxrecord componentargumentResults- the value for theargumentResultsrecord 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 thecommandStringrecord component.- Returns:
- the value of the
commandStringrecord component
-
syntax
Returns the value of thesyntaxrecord component.- Returns:
- the value of the
syntaxrecord component
-
argumentResults
Returns the value of theargumentResultsrecord component.- Returns:
- the value of the
argumentResultsrecord component
-