| Constructor and Description |
|---|
Command(int count)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String command,
int code,
String[] help)
Adds a command to the table
|
int |
code(int index)
Gets the code for a command, given its index
|
int |
count()
Gets the number of commands
|
void |
disable(int index)
Disables a command, given its index
|
int |
find(String command)
Gets the index of a command, given its name
This routine compares the command string with the first part of
all the table entries and returns one of the following:
index (>= 0) If the command is fully matched
CMD_UNKNOWN If the command is not in the table
CMD_AMBIG If the command matches more than one entry
CMD_AMBIG - 1 - index If the command is partially matched
|
int |
getMaxLeng(String command)
Gets the maximum length of matching commands
|
String[] |
help(int index)
Gets the help for a command, given its index
|
String |
name(int index)
Gets the name of a command, given its index
|
void |
showHelp(int index)
Shows help for a command, given its index
|
void |
showHelpSumm(String command)
Shows help summary for matching commands
|
void |
showHelpSumm(String command,
int maxLeng) |
public int count()
public int find(String command)
public void disable(int index)
public String name(int index)
public int code(int index)
public String[] help(int index)
public void showHelp(int index)
public int getMaxLeng(String command)
public void showHelpSumm(String command)
public void showHelpSumm(String command, int maxLeng)
Copyright © 2022 LSST. All rights reserved.