String to
an object of type T
Optional instance if the option has a
mandatory value or doesn't have a value
String to an object of type T. Scope defines where the option
applies. The standard scopes are: BundlingOperationOptionScope,
BundlingOperationModifier. Merge policy defines how to handle
multiple values of the option. Value pattern and description are targeted for
help output.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final Optional | converter
Record Component accessed by converter(). the converter. |
| private final Optional | defaultOptionalValue
Record Component accessed by defaultOptionalValue(). the default optional value or an emptyOptional instance if the option has a
mandatory value or doesn't have a value
|
| private final String | description
Record Component accessed by description(). the description. |
| private final OptionSpec. | mergePolicy
Record Component accessed by mergePolicy(). the merge policy |
| private final List | |
| private final Set | |
| private final Optional | valuePattern
Record Component accessed by valuePattern(). the value pattern. |
| Access | Constructor and Description |
|---|---|
| pack-priv | OptionSpec(List<OptionName> names, Optional<OptionValueConverter<String, T>> converter, Set<OptionScope> scope, OptionSpec.
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv <U> Optional | |
| pack-priv Result | |
| public Optional | |
| pack-priv Stream | Returns: the stream of copy option spec objects each having a single nameReturns a stream of copy option spec objects, each having a single name. |
| pack-priv <U> OptionSpec | |
| pack-priv OptionSpec | |
| pack-priv OptionSpec | |
| public Optional | defaultOptionalValue()
Record Component getter of defaultOptionalValue.
Record Component
the default optional value or an empty
|
| public String | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| pack-priv List | |
| pack-priv OptionName | |
| public final int | |
| pack-priv boolean | |
| pack-priv boolean | |
| public OptionSpec. | |
| pack-priv OptionName | Returns: the first name of this option specReturns the first (primary) name of this option spec. |
| public List | |
| pack-priv List | |
| public Set | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| public Optional | |
| pack-priv Class | |
| private static <T> Optional |
| converter | back to summary |
|---|---|
| private final Optional<OptionValueConverter<String, T>> converter Record Component accessed by converter(). the converter. Converts from a | |
| defaultOptionalValue | back to summary |
|---|---|
| private final Optional<T> defaultOptionalValue Record Component accessed by defaultOptionalValue(). the default optional value or an empty
| |
| description | back to summary |
|---|---|
| private final String description Record Component accessed by description(). the description. Used in help output | |
| mergePolicy | back to summary |
|---|---|
| private final OptionSpec. Record Component accessed by mergePolicy(). the merge policy | |
| names | back to summary |
|---|---|
| private final List<OptionName> names Record Component accessed by names(). the names. Must be non-empty | |
| scope | back to summary |
|---|---|
| private final Set<OptionScope> scope Record Component accessed by scope(). the scope. Must be non-empty | |
| valuePattern | back to summary |
|---|---|
| private final Optional<String> valuePattern Record Component accessed by valuePattern(). the value pattern. Used in help output | |
| OptionSpec | back to summary |
|---|---|
| pack-priv OptionSpec(List<OptionName> names, Optional<OptionValueConverter<String, T>> converter, Set<OptionScope> scope, OptionSpec. | |
| arrayValueConverter | back to summary |
|---|---|
pack-priv <U> Optional
| |
| convert | back to summary |
|---|---|
| pack-priv Result | |
| converter | back to summary |
|---|---|
| public Optional Record Component getter of converter. | |
| copyForEveryName | back to summary |
|---|---|
| pack-priv Stream Returns a stream of copy option spec objects, each having a single name. If the option has three names "a", "b", and "c", the stream will have three option spec objects each with a single name. The first will have name "a", the second - "b", and the third "c".
| |
| copyWithConverter | back to summary |
|---|---|
| pack-priv <U> OptionSpec | |
| copyWithDescription | back to summary |
|---|---|
| pack-priv OptionSpec | |
| copyWithName | back to summary |
|---|---|
| pack-priv OptionSpec | |
| defaultOptionalValue | back to summary |
|---|---|
| public Optional Record Component getter of defaultOptionalValue.
| |
| description | back to summary |
|---|---|
| public String description() Record Component getter of description.
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| findNamesIn | back to summary |
|---|---|
| pack-priv List | |
| getFirstNameIn | back to summary |
|---|---|
| pack-priv OptionName getFirstNameIn(Options cmdline) | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| hasValue | back to summary |
|---|---|
| pack-priv boolean hasValue() | |
| isValueOptional | back to summary |
|---|---|
| pack-priv boolean isValueOptional() | |
| mergePolicy | back to summary |
|---|---|
| public OptionSpec. Record Component getter of mergePolicy.
| |
| name | back to summary |
|---|---|
| pack-priv OptionName name() Returns the first (primary) name of this option spec.
| |
| names | back to summary |
|---|---|
| public List Record Component getter of names.
| |
| otherNames | back to summary |
|---|---|
| pack-priv List Returns all names but the first of this option spec. Returns an empty list if the option spec has only one name.
| |
| scope | back to summary |
|---|---|
| public Set Record Component getter of scope.
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| valuePattern | back to summary |
|---|---|
| public Optional Record Component getter of valuePattern.
| |
| valueType | back to summary |
|---|---|
| pack-priv Class | |
| valueType | back to summary |
|---|---|
| private static <T> Optional | |
| Modifier and Type | Field and Description |
|---|---|
| public static final OptionSpec. | |
| public static final OptionSpec. | |
| public static final OptionSpec. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static OptionSpec. | |
| public static OptionSpec. |
| CONCATENATE | back to summary |
|---|---|
| public static final OptionSpec. | |
| USE_FIRST | back to summary |
|---|---|
| public static final OptionSpec. | |
| USE_LAST | back to summary |
|---|---|
| public static final OptionSpec. | |
| MergePolicy | back to summary |
|---|---|
| private MergePolicy() | |
| valueOf | back to summary |
|---|---|
| public static OptionSpec. | |
| values | back to summary |
|---|---|
| public static OptionSpec. | |