public final class CommandParser
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static Command |
parse(int senderId,
java.lang.String sender,
java.lang.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, java.lang.String sender, java.lang.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 stringjava.lang.IllegalArgumentException
- 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.