Class Command

java.lang.Object
  extended by Command

public class Command
extends Object


Constructor Summary
Command(String commandWord, String secondWord)
          constructor for objects of type Command
 
Method Summary
 String getCommandWord()
          Return the command word (the first word) of this command.
 String getSecondWord()
           
 boolean hasSecondWord()
           
 boolean isUnknown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Command

public Command(String commandWord,
               String secondWord)
constructor for objects of type Command

Method Detail

getCommandWord

public String getCommandWord()
Return the command word (the first word) of this command.

Returns:
The command word.

getSecondWord

public String getSecondWord()
Returns:
The second word of this command. Returns null if there was no second word.

hasSecondWord

public boolean hasSecondWord()
Returns:
true if the command has a second word.

isUnknown

public boolean isUnknown()
Returns:
true if this command was not understood.