|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Marks an argument as being "flagged" - that is, as having its value on the command line preceded by an indicator. Flagged arguments can be preceded by a "short flag," a hyphen followed by a single character, or a "long flag," two hyphens followed by a word.
For example, a short flag 'i' marking an option as meaning "input file" might result in a command line that contains the substring "-i myfile.txt" or "-i=myfile.txt", whereas the same option with a long flag of "inputfile" might contain a substring such as "--inputfile myfile.txt" or "--inputfile=myfile.txt"
Note that the setter methods setShortFlag() and setLongFlag() are not part of this Interface. This is because including them would prevent the setShortFlag() and setLongFlag() methods in FlaggedOption and Switch from returning references to themselves, which is inconvenient and inconsistent with the rest of the API.
Switch
,
FlaggedOption
Method Summary | |
String |
getLongFlag()
Returns the long flag for this object. |
char |
getShortFlag()
Returns the short flag for this object in the form of a char. |
Character |
getShortFlagCharacter()
Returns the short flag for this object in the form of a Character. |
Method Detail |
public char getShortFlag()
public Character getShortFlagCharacter()
public String getLongFlag()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |