| Constructor and Description |
|---|
Switch(String shortName,
String longName,
String description)
Create a new switch.
|
| 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.
|
Boolean |
getValue()
Return the value of this argument.
|
Boolean |
getValue(Boolean 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 current,
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.
|
public void visit(String current, 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.
public String getShortName()
getShortName in interface Argument<Boolean>public String getLongName()
getLongName in interface Argument<Boolean>public String getDescription()
getDescription in interface Argument<Boolean>public boolean isRequired()
isRequired in interface Argument<Boolean>public boolean wasFound()
wasFound in interface Argument<Boolean>Argument.visit(String, CommandLine)public Boolean getValue()
Copyright © 2004–2022 dishevelled.org. All rights reserved.