com.martiansoftware.jsap
Interface Flagged

All Known Implementing Classes:
FlaggedOption, Switch

public interface Flagged

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.

Author:
Marty Lamb
See Also:
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

getShortFlag

public char getShortFlag()
Returns the short flag for this object in the form of a char.

Returns:
the short flag for this object in the form of a char.

getShortFlagCharacter

public Character getShortFlagCharacter()
Returns the short flag for this object in the form of a Character.

Returns:
the short flag for this object in the form of a Character.

getLongFlag

public String getLongFlag()
Returns the long flag for this object.

Returns:
the long flag for this object.


Copyright © 2002-2006, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/jsap