Class Command
java.lang.Object
Command
public class Command
- extends Object
Constructor Summary |
Command(String commandWord,
String secondWord)
constructor for objects of type Command |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Command
public Command(String commandWord,
String secondWord)
- constructor for objects of type Command
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.