Class CommandParser
java.lang.Object
CommandParser
public final class CommandParser extends Object
-
Method Details
-
parse
Parses a string command received from a client into its component parts, and creates aCommand
object representing it.- Parameters:
senderId
- The backend-generated ID for the sender of the commandsender
- The current username of the sendercommandString
- The command string to parse- Returns:
- a subclass of
Command
corresponding to the string - Throws:
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.
-