Class UIOptionCollection<T extends UIOption<T>>
java.lang.Object
org.apache.rat.ui.UIOptionCollection<T>
- Type Parameters:
T- the AbstractOption implementation.
- Direct Known Subclasses:
AntOptionCollection, CLIOptionCollection, MavenOptionCollection
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classUIOptionCollection.Builder<T extends UIOption<T>, S extends UIOptionCollection.Builder<T,S>> Builder for a BaseOptionCollection. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUIOptionCollection(UIOptionCollection.Builder<T, ?> builder) Construct the UIOptionCollection from the builder. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.apache.commons.cli.OptionsGets the additional options understood by this collection.final StringdefaultValue(org.apache.commons.cli.Option option) Gets the default value for the option.getMappedOption(org.apache.commons.cli.Option option) Gets the UiOption instance for the Option.Gets the Stream of AbstractOption implementations understood by this collection.Gets a map client option name to specified AbstractOption implementation.final org.apache.commons.cli.OptionsGets an Options that contains the RAT Arg defined Option instances that are understood by this collection.final Optional<org.apache.commons.cli.Option> getSelected(Arg arg) Gets the selected Option for the arg.final org.apache.commons.cli.OptionsGets the collection of unsupported Options.final booleanisSelected(Arg arg) Checks if an Arg is selected.
-
Constructor Details
-
UIOptionCollection
Construct the UIOptionCollection from the builder.- Parameters:
builder- the builder to build from.
-
-
Method Details
-
isSelected
Checks if an Arg is selected.- Parameters:
arg- the Arg to check.- Returns:
trueif the arg is selected.
-
getSelected
-
getUnsupportedOptions
public final org.apache.commons.cli.Options getUnsupportedOptions()Gets the collection of unsupported Options.- Returns:
- the Options comprised for the unsupported options.
-
getMappedOption
-
getOptions
public final org.apache.commons.cli.Options getOptions()Gets an Options that contains the RAT Arg defined Option instances that are understood by this collection. OptionGroups are registered in the resulting Options object.- Returns:
- an Options that contains the RAT Arg defined Option instances that are understood by this collection.
-
getMappedOptions
-
getOptionMap
-
additionalOptions
public final org.apache.commons.cli.Options additionalOptions()Gets the additional options understood by this collection.- Returns:
- the additional options understood by this collection.
-
defaultValue
Gets the default value for the option.- Parameters:
option- the option to lookup.- Returns:
- the default value or
nullif not set.
-