public final class CommandParser extends Object
Modifier and Type | Method and Description |
---|---|
static Command |
parse(int senderId,
String sender,
String commandString)
Parses a string command received from a client into its component
parts, and creates a
Command object representing it. |
public static Command parse(int senderId, String sender, String commandString)
Command
object representing it.senderId
- The backend-generated ID for the sender of the commandsender
- The current username of the sendercommandString
- The command string to parseCommand
corresponding to the stringIllegalArgumentException
- if the commandString is syntactically
invalid, meaning that it is of an unrecognized type or its components
do not match its type.
You do not need to modify this file.