|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.cli.OptionGroup
public class OptionGroup
A group of mutually exclusive options.
Constructor Summary | |
---|---|
OptionGroup()
|
Method Summary | |
---|---|
OptionGroup |
addOption(Option option)
Add the specified Option 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 option)
Set the selected option of this group to name . |
String |
toString()
Returns the stringified version of this OptionGroup. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OptionGroup()
Method Detail |
---|
public OptionGroup addOption(Option option)
Option
to this group.
option
- the option to add to this group
public Collection getNames()
Collection
public Collection getOptions()
Collection
public void setSelected(Option option) throws AlreadySelectedException
name
.
option
- the option that is selected
AlreadySelectedException
- if an option from this group has
already been selected.public String getSelected()
public void setRequired(boolean required)
required
- specifies if this group is requiredpublic boolean isRequired()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |