public final class CommandParser extends Object
static method parse(String).public static Command parse(String commandString)
Parses a string command received from a client into its component
parts, the type, parameters, and payload, and constructs a Command object to represent these components.
You may want to look at the Javadocs for String.
commandString - the command string to parseCommand corresponding to the inputIllegalArgumentException - if the commandString is syntactically invalid, meaning that it
is of an unrecognized type or its components do not match its
type; see Command for more detailsCommand.Command(Command.Type, String, String, String)