Class UpdatableOptionGroup
java.lang.Object
org.apache.commons.cli.OptionGroup
org.apache.rat.ui.UpdatableOptionGroup
- All Implemented Interfaces:
Serializable
public final class UpdatableOptionGroup
extends org.apache.commons.cli.OptionGroup
An implementation of Apache Commons CLI OptionGroup that allows options to be removed (disabled).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddOption(org.apache.commons.cli.Option option) static UpdatableOptionGroupcreate(org.apache.commons.cli.OptionGroup group) Converts the group into an UpdatableOptionGroup if it is not already an instancevoiddisableOption(org.apache.commons.cli.Option option) Disable an option in the group.Stream<org.apache.commons.cli.Option> Gets the disabled options for this group.Collection<org.apache.commons.cli.Option> booleanisEmpty()voidreset()Reset the group so that all disabled options are re-enabled.Methods inherited from class org.apache.commons.cli.OptionGroup
getNames, getSelected, isRequired, setRequired, setSelected, toString
-
Method Details
-
create
Converts the group into an UpdatableOptionGroup if it is not already an instance- Parameters:
group- the group to convert.- Returns:
- an UpdatableOptionGroup.
-
disableOption
public void disableOption(org.apache.commons.cli.Option option) Disable an option in the group.- Parameters:
option- The option to disable.
-
isEmpty
public boolean isEmpty() -
getDisableOptions
Gets the disabled options for this group.- Returns:
- the set of disabled options for this group.
-
reset
public void reset()Reset the group so that all disabled options are re-enabled. -
getOptions
- Overrides:
getOptionsin classorg.apache.commons.cli.OptionGroup
-
addOption
- Overrides:
addOptionin classorg.apache.commons.cli.OptionGroup
-