Interface Options
Use OptionValue for typed access of the stored objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optionsdefault booleanbooleancontains(jdk.jpackage.internal.cli.OptionName optionName) default booleancontains(WithOptionIdentifier withId) default OptionscopyWith(Iterable<? extends OptionIdentifier> ids) Creates a copy of this instance with all but the given option identifiers filtered out.default OptionscopyWith(OptionIdentifier... ids) Creates a copy of this instance with all but the given option identifiers filtered out.default OptionscopyWithDefaultValue(WithOptionIdentifier withId, Object value) default OptionscopyWithDefaultValue(WithOptionIdentifier withId, Supplier<Object> valueSupplier) copyWithout(Iterable<? extends OptionIdentifier> ids) Creates a copy of this instance without the given option identifiers.default OptionscopyWithout(OptionIdentifier... ids) Creates a copy of this instance without the given option identifiers.default OptionscopyWithParent(Options other) find(OptionIdentifier id) find(WithOptionIdentifier withId) Set<? extends OptionIdentifier> ids()static Optionsof(Map<? extends WithOptionIdentifier, Object> map) CreatesOptionsinstance from the map of objects with option identifiers and associated option values.static OptionsofIDs(Map<OptionIdentifier, Object> map) CreatesOptionsinstance from the map of option identifiers and associated option values.default Map<OptionIdentifier, Object> toMap()Returns a map representation of this instance.
-
Method Details
-
find
-
contains
boolean contains(jdk.jpackage.internal.cli.OptionName optionName) -
ids
Set<? extends OptionIdentifier> ids() -
find
-
contains
-
contains
-
copyWithDefaultValue
-
copyWithDefaultValue
-
copyWithParent
-
copyWithout
Creates a copy of this instance without the given option identifiers.contains(OptionIdentifier)called on the return instance with any of the given identifiers will returnfalse.contains(OptionName)called on the return instance with any option name of option specifications associated with given identifiers will returnfalse.- Parameters:
ids- the identifiers to exclude- Returns:
- a copy of this instance without the given option identifiers
-
copyWithout
Creates a copy of this instance without the given option identifiers.Same as
copyWithout(OptionIdentifier...)but takes anIterable<OptionIdentifier>instead of anOptionIdentifier[].- Parameters:
ids- the identifiers to exclude- Returns:
- a copy of this instance without the given option identifiers
-
copyWith
Creates a copy of this instance with all but the given option identifiers filtered out.contains(OptionIdentifier)called on the returned instance with any identifiers not in the given array will returnfalse.contains(OptionName)called on the returned instance with any name returned byOptionSpec.name()method called on option specifications of identifiers of typeOptionnot from the given identifier array will returnfalse.- Parameters:
ids- the identifiers to keep in the copy- Returns:
- a copy of this instance with all but the given option identifiers filtered out
-
copyWith
Creates a copy of this instance with all but the given option identifiers filtered out.Same as
copyWith(OptionIdentifier...)but takes anIterable<OptionIdentifier>instead of anOptionIdentifier[].- Parameters:
ids- the identifiers to keep in the copy- Returns:
- a copy of this instance with all but the given option identifiers filtered out
-
toMap
Returns a map representation of this instance.- Returns:
- the map representation of this instance.
-
of
CreatesOptionsinstance from the map of objects with option identifiers and associated option values.- Parameters:
map- the map of objects with option identifiers and associated option values- Returns:
- a new
Optionsinstance
-
ofIDs
CreatesOptionsinstance from the map of option identifiers and associated option values.Similar to
of(Map)method, butcontains(OptionName)called on the return instance will always returnfalse.- Parameters:
map- the map of option identifiers and associated option values- Returns:
- a new
Optionsinstance
-
concat
-