document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. public class CommandWords
  2. {
  3.     private static final String[] validCommands = {
  4.         "go", "quit", "help"
  5.     };
  6.  
  7.    
  8.     public CommandWords()
  9.     {
  10.  
  11.     }
  12.  
  13.     public boolean isCommand(String aString)
  14.     {
  15.         for(int i = 0; i < validCommands.length; i++) {
  16.             if(validCommands[i].equals(aString))
  17.                 return true;
  18.         }
  19.         return false;
  20.     }
  21. }
');