Class CommandWords
- java.lang.Object
-
- CommandWords
-
public class CommandWords extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]
validCommands
-
Constructor Summary
Constructors Constructor Description CommandWords()
Constructor - initialise the command words.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCommandList()
returns a String of all valid commands.boolean
isCommand(java.lang.String aString)
Check whether a given String is a valid command word.
-
-
-
Field Detail
-
validCommands
private static final java.lang.String[] validCommands
-
-
Constructor Detail
-
CommandWords
public CommandWords()
Constructor - initialise the command words.
-
-
Method Detail
-
isCommand
public boolean isCommand(java.lang.String aString)
Check whether a given String is a valid command word. Return true if it is, false if it isn't.
-
getCommandList
public java.lang.String getCommandList()
returns a String of all valid commands.
-
-