org.apache.commons.cli
public class OptionGroup extends Object
Version: $Revision: 542144 $
| Field Summary | |
|---|---|
| HashMap | optionMap hold the options |
| boolean | required specified whether this group is required |
| String | selected the name of the selected option |
| Method Summary | |
|---|---|
| OptionGroup | addOption(Option opt)
add opt to this group
|
| Collection | getNames() |
| Collection | getOptions() |
| String | getSelected() |
| boolean | isRequired()
Returns whether this option group is required.
|
| void | setRequired(boolean required) |
| void | setSelected(Option opt)
set the selected option of this group to name. |
| String | toString() Returns the stringified version of this OptionGroup. |
opt to this group
Parameters: opt the option to add to this group
Returns: this option group with opt added
Returns: the names of the options in this group as a
Collection
Returns: the options in this group as a Collection
Returns: the selected option name
Returns: whether this option group is required
Parameters: required specifies if this group is required
name.Parameters: opt the option that is selected
Throws: AlreadySelectedException if an option from this group has already been selected.
Returns the stringified version of this OptionGroup.
Returns: the stringified representation of this group