org.aitools.programd.interfaces.shell
Class WhoCommand

java.lang.Object
  extended by org.aitools.programd.interfaces.shell.ShellCommand
      extended by org.aitools.programd.interfaces.shell.WhoCommand

public class WhoCommand
extends ShellCommand

Prints the ID of the current bot to the shell console.

Since:
4.5
Author:
Noel Bush

Field Summary
static java.lang.String ARGUMENT_TEMPLATE
          Argument template.
private static java.lang.String HELP_LINE
          Shell help line.
private static java.lang.String SHELL_COMMAND
          Shell command.
 
Constructor Summary
WhoCommand()
          Creates a new WhoCommand.
 
Method Summary
 void handle(java.lang.String commandLine, Shell shell)
          Prints the ID of the current bot to the shell console.
 boolean handles(java.lang.String commandLine)
          Indicates whether the ShellCommand handles a command contained in the given line.
 
Methods inherited from class org.aitools.programd.interfaces.shell.ShellCommand
getArgumentTemplate, getCommandString, getHelpLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHELL_COMMAND

private static final java.lang.String SHELL_COMMAND
Shell command.

See Also:
Constant Field Values

ARGUMENT_TEMPLATE

public static final java.lang.String ARGUMENT_TEMPLATE
Argument template.

See Also:
Constant Field Values

HELP_LINE

private static final java.lang.String HELP_LINE
Shell help line.

See Also:
Constant Field Values
Constructor Detail

WhoCommand

public WhoCommand()
Creates a new WhoCommand.

Method Detail

handles

public boolean handles(java.lang.String commandLine)
Description copied from class: ShellCommand
Indicates whether the ShellCommand handles a command contained in the given line.

Specified by:
handles in class ShellCommand
Parameters:
commandLine - the line of text received
Returns:
whether the ShellCommand handles this
See Also:
ShellCommand.handles(java.lang.String)

handle

public void handle(java.lang.String commandLine,
                   Shell shell)
Prints the ID of the current bot to the shell console.

Specified by:
handle in class ShellCommand
Parameters:
commandLine - the command line to handle
shell - the shell that got the command
See Also:
ShellCommand.handle(java.lang.String, org.aitools.programd.interfaces.shell.Shell)