public class SimpleSwitch extends AbstractSimpleSwitch
description, longForm, shortForm
Constructor and Description |
---|
SimpleSwitch(java.lang.Character shortForm,
java.lang.String longForm,
java.lang.String description)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
found(char shortSwitch)
This switch appears in the command line in the given short form.
|
void |
found(java.lang.String longSwitch)
This switch appears in the command line in the given long form.
|
java.lang.String |
getAppearance()
Get the appearance of this switch or argument on the command line.
|
boolean |
hasAppeared()
Has the switch appeared on the command line?
|
void |
setAppeared(boolean appeared)
Set whether this switch has appeared.
|
getDescription, getLongForms, getShortForms
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
consumeArgument, isOptional, isSwitch, needsArguments
@NotNull public java.lang.String getAppearance()
SwitchOrArgument
public void found(char shortSwitch)
Switch
shortSwitch
- short form in which this switch appearedpublic void found(@NotNull java.lang.String longSwitch)
Switch
longSwitch
- long formpublic boolean hasAppeared()
true
: the switch was included on the command linefalse
: the switch was not found on the command linepublic void setAppeared(boolean appeared)
found()
methods.appeared
- true
: the switch was included on the command linefalse
: the switch was not found on the command line