public abstract class AbstractSimpleSwitch extends java.lang.Object implements Switch
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
description |
protected java.lang.String |
longForm |
protected java.lang.Character |
shortForm |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSimpleSwitch(java.lang.Character shortForm,
java.lang.String longForm,
java.lang.String description)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Get a short description for this switch.
|
java.util.Collection<java.lang.String> |
getLongForms()
Get the long forms influencing this switch.
|
java.util.Collection<java.lang.Character> |
getShortForms()
Get the short one character forms influencing this switch.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
consumeArgument, found, found, isOptional, isSwitch, needsArguments
getAppearance
@NotNull protected final java.lang.Character shortForm
@NotNull protected final java.lang.String longForm
@NotNull protected final java.lang.String description
protected AbstractSimpleSwitch(@NotNull java.lang.Character shortForm, @NotNull java.lang.String longForm, @NotNull java.lang.String description)
shortForm
- short form of the switchlongForm
- long form of the switchdescription
- description or this switch@NotNull public java.util.Collection<java.lang.Character> getShortForms()
Switch
If the command line switch is -k
, this method
should return a singleton collection with the character
k
.
getShortForms
in interface Switch
@NotNull public java.util.Collection<java.lang.String> getLongForms()
Switch
The return strings must not include the --
prefix,
and have to consist of characters, digits and the minus
sign (-
.
So if the command line switch is --kill-all-idiots
,
this method should return a singleton collection with the
string kill-all-idiots
.
getLongForms
in interface Switch
@NotNull public java.lang.String getDescription()
SwitchOrArgument
getDescription
in interface SwitchOrArgument