E
- argument typepublic interface Argument<E>
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Return the description of this argument.
|
String |
getLongName()
Return the long name of this argument.
|
String |
getShortName()
Return the short name of this argument.
|
E |
getValue()
Return the value of this argument.
|
E |
getValue(E defaultValue)
Return the value of this argument or the specified default value
if this argument was not found in the command line.
|
boolean |
isRequired()
Return true if this argument is required.
|
void |
visit(String s,
CommandLine commandLine)
Visit the specified argument string from the specified command line.
|
boolean |
wasFound()
Return true if this argument was found in the
command line, false if it was not found or if
this argument has not visited a command line
yet.
|
void visit(String s, CommandLine commandLine) throws Exception
Previous and next argument strings in the command line may be interrogated by this argument, but the cursor position of the command line must be reset to what it was at the beginning of this method invocation.
s
- current argument stringcommandLine
- command line to visitException
- if any error occursString getShortName()
String getLongName()
String getDescription()
boolean isRequired()
boolean wasFound()
visit(String, CommandLine)
E getValue()
Copyright (c) 2004-2014 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).