public abstract class AbstractSwitch 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 |
AbstractSwitch(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, waitconsumeArgument, found, found, isOptional, isSwitch, needsArgumentsgetAppearance, isVarLength@NotNull protected final java.lang.Character shortForm
@NotNull protected final java.lang.String longForm
@NotNull protected final java.lang.String description
@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()
SwitchOrArgumentgetDescription in interface SwitchOrArgument