| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
Tools.Command
Command.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) static SortedMap<String,Tools.Command> |
COMMANDS
Map of commands keyed by command name.
|
| Constructor and Description |
|---|
Tools(String[] args,
SortedMap<String,Tools.Command> commands)
Create a new tools callable with the specified map of commands keyed
by name and array of arguments.
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
call() |
(package private) static String[] |
dropFirst(String[] args)
Drop the first element from the specified array.
|
(package private) static String[] |
first(String[] args)
Return an array containing the first element of the specified array.
|
static void |
main(String[] args)
Main.
|
(package private) String |
usage()
Return the usage message.
|
static SortedMap<String,Tools.Command> COMMANDS
public Tools(String[] args, SortedMap<String,Tools.Command> commands)
args - args, must not be nullcommands - map of commands keyed by name, must not be nullString usage()
static String[] first(String[] args)
args - argsstatic String[] dropFirst(String[] args)
args - argspublic static void main(String[] args)
args - command line argsCopyright (c) 2013-2023 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).