public class OptionGroup extends Object implements Serializable
| Constructor and Description |
|---|
OptionGroup() |
| Modifier and Type | Method and Description |
|---|---|
OptionGroup |
addOption(Option option)
Add the specified
Option to this group. |
Collection<String> |
getNames() |
Collection<Option> |
getOptions() |
String |
getSelected() |
boolean |
isRequired()
Tests 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.
|
public OptionGroup addOption(Option option)
Option to this group.option - the option to add to this grouppublic Collection<String> getNames()
Collectionpublic Collection<Option> getOptions()
Collectionpublic String getSelected()
public boolean isRequired()
public void setRequired(boolean required)
required - specifies if this group is requiredpublic void setSelected(Option option) throws AlreadySelectedException
name.option - the option that is selectedAlreadySelectedException - if an option from this group has already been selected.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.