APIdia Launch Partner
Top Description Methods
jdk.jpackage.internal.cli

public sealed Interface Options

permits JOptSimpleOptionsBuilder.ExtendedOptions<T>, DefaultOptions
Known Direct Subinterfaces
jdk.jpackage.internal.cli.JOptSimpleOptionsBuilder.ExtendedOptions
Known Direct Implementers
jdk.jpackage.internal.cli.DefaultOptions
Static Imports
java.util.stream.Collectors.toUnmodifiableMap

R/O collection of objects associated with option identifiers.

Use OptionValue for typed access of the stored objects.

Method Summary

Modifier and TypeMethod and Description
public static Options
concat(Options... options)

public boolean
contains(OptionName optionName)

public default boolean
public default boolean
public default Options

Returns:

a copy of this instance with all but the given option identifiers filtered out
copyWith
(OptionIdentifier...
the identifiers to keep in the copy
ids
)

Creates a copy of this instance with all but the given option identifiers filtered out.

public default Options

Returns:

a copy of this instance with all but the given option identifiers filtered out
copyWith
(Iterable<? extends OptionIdentifier>
the identifiers to keep in the copy
ids
)

Creates a copy of this instance with all but the given option identifiers filtered out.

public default Options
public default Options
public default Options

Returns:

a copy of this instance without the given option identifiers
copyWithout
(OptionIdentifier...
the identifiers to exclude
ids
)

Creates a copy of this instance without the given option identifiers.

public Options

Returns:

a copy of this instance without the given option identifiers
copyWithout
(Iterable<? extends OptionIdentifier>
the identifiers to exclude
ids
)

Creates a copy of this instance without the given option identifiers.

public default Options
public Optional<Object>
public default Optional<Object>
public Set<? extends OptionIdentifier>
ids()

public static Options

Returns:

a new Options instance
of
(Map<? extends WithOptionIdentifier, Object>
the map of objects with option identifiers and associated option values
map
)

Creates Options instance from the map of objects with option identifiers and associated option values.

public static Options

Returns:

a new Options instance
ofIDs
(Map<OptionIdentifier, Object>
the map of option identifiers and associated option values
map
)

Creates Options instance from the map of option identifiers and associated option values.

private static DefaultOptions
public default Map<OptionIdentifier, Object>

Returns:

the map representation of this instance.
toMap
()

Returns a map representation of this instance.

Method Detail

concatback to summary
public static Options concat(Options... options)
containsback to summary
public boolean contains(OptionName optionName)
containsback to summary
public default boolean contains(OptionIdentifier id)
containsback to summary
public default boolean contains(WithOptionIdentifier withId)
copyWithback to summary
public default Options copyWith(OptionIdentifier... ids)

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 return false. contains(OptionName) called on the returned instance with any name returned by OptionSpec#name() method called on option specifications of identifiers of type Option not from the given identifier array will return false.

Parameters
ids:OptionIdentifier[]

the identifiers to keep in the copy

Returns:Options

a copy of this instance with all but the given option identifiers filtered out

copyWithback to summary
public default Options copyWith(Iterable<? extends OptionIdentifier> ids)

Creates a copy of this instance with all but the given option identifiers filtered out.

Same as copyWith(OptionIdentifier...) but takes an Iterable<OptionIdentifier> instead of an OptionIdentifier[].

Parameters
ids:Iterable<? extends OptionIdentifier>

the identifiers to keep in the copy

Returns:Options

a copy of this instance with all but the given option identifiers filtered out

copyWithDefaultValueback to summary
public default Options copyWithDefaultValue(WithOptionIdentifier withId, Object value)
copyWithDefaultValueback to summary
public default Options copyWithDefaultValue(WithOptionIdentifier withId, Supplier<Object> valueSupplier)
copyWithoutback to summary
public default Options copyWithout(OptionIdentifier... ids)

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 return false. contains(OptionName) called on the return instance with any option name of option specifications associated with given identifiers will return false.

Parameters
ids:OptionIdentifier[]

the identifiers to exclude

Returns:Options

a copy of this instance without the given option identifiers

copyWithoutback to summary
public Options copyWithout(Iterable<? extends OptionIdentifier> ids)

Creates a copy of this instance without the given option identifiers.

Same as copyWithout(OptionIdentifier...) but takes an Iterable<OptionIdentifier> instead of an OptionIdentifier[].

Parameters
ids:Iterable<? extends OptionIdentifier>

the identifiers to exclude

Returns:Options

a copy of this instance without the given option identifiers

copyWithParentback to summary
public default Options copyWithParent(Options other)
findback to summary
public Optional<Object> find(OptionIdentifier id)
findback to summary
public default Optional<Object> find(WithOptionIdentifier withId)
idsback to summary
public Set<? extends OptionIdentifier> ids()
ofback to summary
public static Options of(Map<? extends WithOptionIdentifier, Object> map)

Creates Options instance from the map of objects with option identifiers and associated option values.

Parameters
map:Map<? extends WithOptionIdentifier, Object>

the map of objects with option identifiers and associated option values

Returns:Options

a new Options instance

ofIDsback to summary
public static Options ofIDs(Map<OptionIdentifier, Object> map)

Creates Options instance from the map of option identifiers and associated option values.

Similar to of(Map) method, but contains(OptionName) called on the return instance will always return false.

Parameters
map:Map<OptionIdentifier, Object>

the map of option identifiers and associated option values

Returns:Options

a new Options instance

toDefaultOptionsback to summary
private static DefaultOptions toDefaultOptions(Options v)
toMapback to summary
public default Map<OptionIdentifier, Object> toMap()

Returns a map representation of this instance.

Returns:Map<OptionIdentifier, Object>

the map representation of this instance.