Record Class ParsedInput
java.lang.Object
java.lang.Record
org.springframework.shell.core.command.ParsedInput
public record ParsedInput(String commandName, List<String> subCommands, List<CommandOption> options, List<CommandArgument> arguments)
extends Record
Record representing the result of parsing user input into commands.
- Since:
- 4.0.0
- Author:
- Mahmoud Ben Hassine
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionParsedInput(String commandName, List<String> subCommands, List<CommandOption> options, List<CommandArgument> arguments) Creates an instance of aParsedInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord component.static ParsedInput.Builderbuilder()Returns the value of thecommandNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.options()Returns the value of theoptionsrecord component.Returns the value of thesubCommandsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ParsedInput
public ParsedInput(String commandName, List<String> subCommands, List<CommandOption> options, List<CommandArgument> arguments) Creates an instance of aParsedInputrecord class.- Parameters:
commandName- the value for thecommandNamerecord componentsubCommands- the value for thesubCommandsrecord componentoptions- the value for theoptionsrecord componentarguments- the value for theargumentsrecord component
-
-
Method Details
-
builder
-
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). -
commandName
Returns the value of thecommandNamerecord component.- Returns:
- the value of the
commandNamerecord component
-
subCommands
Returns the value of thesubCommandsrecord component.- Returns:
- the value of the
subCommandsrecord component
-
options
Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-