public class QuitCommand extends java.lang.Object implements GUICommand
GUICommand
which quite the client.Modifier and Type | Field and Description |
---|---|
private CommandCallback |
commandCallback
The
CommandCallback instance. |
Constructor and Description |
---|
QuitCommand(CommandCallback commandCallback)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute()
Returns whether this command may be executed.
|
void |
execute()
Executes the command.
|
@NotNull private final CommandCallback commandCallback
CommandCallback
instance.public QuitCommand(@NotNull CommandCallback commandCallback)
commandCallback
- the command callback instancepublic boolean canExecute()
canExecute
in interface GUICommand
public void execute()
GUICommand.canExecute()
returns false
.execute
in interface GUICommand