public class Parser
extends java.lang.Object
Constructor and Description |
---|
Parser(java.lang.String[] commands)
Create a parser to read from the terminal window.
|
Modifier and Type | Method and Description |
---|---|
Command |
getCommand()
builds a command from the user input
|
java.lang.String |
showCommands()
returns a list of valid command words formatted as a string
|
public Parser(java.lang.String[] commands)
commands
- an array of valid command wordspublic Command getCommand()
public java.lang.String showCommands()