public abstract class AbstractCommand extends Object implements Command
| Modifier and Type | Method and Description |
|---|---|
CommandRunner |
getCommandRunner()
Get the command runner.
|
Context |
getContext()
Get the command context.
|
Command |
getParentCommand()
Get the parent command.
|
<T extends Command> |
getParentCommand(Class<T> clazz)
Get the parent command with the specified class.
|
boolean |
hasParentCommand()
Check if this command has the parent command.
|
<T extends Command> |
hasParentCommand(Class<T> clazz)
Check if this command has the parent command with the specified class.
|
void |
reset()
Reset the command state.
|
void |
setCommandRunner(CommandRunner commandRunner)
Set the command runner.
|
void |
setContext(Context context)
Set the command context.
|
public final boolean hasParentCommand()
CommandhasParentCommand in interface Commandpublic final <T extends Command> boolean hasParentCommand(Class<T> clazz)
CommandhasParentCommand in interface CommandT - the generic type of the specified class.clazz - the specified class.public final Command getParentCommand()
CommandgetParentCommand in interface Commandpublic final <T extends Command> Command getParentCommand(Class<T> clazz)
CommandgetParentCommand in interface CommandT - the generic type of the specified class.clazz - the specified class.public final Context getContext()
CommandgetContext in interface Commandpublic final void setContext(Context context)
CommandsetContext in interface Commandcontext - the command context.public final CommandRunner getCommandRunner()
CommandgetCommandRunner in interface Commandpublic final void setCommandRunner(CommandRunner commandRunner)
CommandsetCommandRunner in interface CommandcommandRunner - the command runner.Copyright © 2019. All rights reserved.