null keys or values are permitted.
| Modifier and Type | Class and Description |
|---|---|
| public static class | OptionMap.
A builder for immutable option maps. |
| Modifier and Type | Field and Description |
|---|---|
| public static final OptionMap | EMPTY
The empty option map. |
| private static final long | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static OptionMap. | |
| public boolean | |
| public static < the option value type T> OptionMap | |
| public static < the first option value type T1, the second option value type T2> OptionMap | |
| public boolean | Returns: true if they are equal, false otherwisethe other option map other)Overrides java. Determine whether this option map is equal to another. |
| public boolean | |
| public < the type of the option T> T | |
| public < the type of the option T> T | |
| public boolean | |
| public int | |
| public long | |
| public int | Returns: the hash codeOverrides java. Get the hash code for this option map. |
| public Iterator | Returns: an iterator over the optionsImplements java. Iterate over the options in this map. |
| public int | |
| public String |
| EMPTY | back to summary |
|---|---|
| public static final OptionMap EMPTY The empty option map. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| value | back to summary |
|---|---|
| private final Map<Option<?>, Object> value | |
| OptionMap | back to summary |
|---|---|
| private OptionMap(final Map<Option<?>, Object> value) | |
| builder | back to summary |
|---|---|
| public static OptionMap. Create a new builder. | |
| contains | back to summary |
|---|---|
| public boolean contains(Option<?> option) Determine whether this option map contains the given option.
| |
| create | back to summary |
|---|---|
| public static <T> OptionMap create(Option<T> option, T value) Create a single-valued option map. | |
| create | back to summary |
|---|---|
| public static <T1, T2> OptionMap create(Option<T1> option1, T1 value1, Option<T2> option2, T2 value2) Create a two-valued option map. If both options are the same key, then only the second one is added to the map. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Determine whether this option map is equal to another.
| |
| equals | back to summary |
|---|---|
| public boolean equals(OptionMap other) Determine whether this option map is equal to another.
| |
| get | back to summary |
|---|---|
| public <T> T get(Option<T> option) Get the value of an option from this option map.
| |
| get | back to summary |
|---|---|
| public <T> T get(Option<T> option, T defaultValue) Get the value of an option from this option map, with a specified default if the value is missing.
| |
| get | back to summary |
|---|---|
| public boolean get(Option<Boolean> option, boolean defaultValue) Get a boolean value from this option map, with a specified default if the value is missing. | |
| get | back to summary |
|---|---|
| public int get(Option<Integer> option, int defaultValue) Get a int value from this option map, with a specified default if the value is missing. | |
| get | back to summary |
|---|---|
| public long get(Option<Long> option, long defaultValue) Get a long value from this option map, with a specified default if the value is missing. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Get the hash code for this option map.
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Iterate over the options in this map. | |
| size | back to summary |
|---|---|
| public int size() Get the number of options stored in this map.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
OptionMap#builder() method.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public OptionMap. | |
| public OptionMap. | |
| private <T> void | |
| private <T> void | |
| public OptionMap | Returns: the new immutable option mapBuild a map that reflects the current state of this builder. |
| public < the option type T> OptionMap. | |
| public < the option type T> OptionMap. | Returns: this builderthe key key, String the string value stringValue, ClassLoader the class loader to use for parsing the value classLoader)Set a key-value pair, parsing the value from the given string. |
| public OptionMap. | Returns: this builderthe properties to read props, String the prefix prefix, ClassLoader the class loader to use to resolve option names optionClassLoader)Add all options from a properties file. |
| public OptionMap. | Returns: this builderthe properties to read props, String the prefix prefix)Add all options from a properties file. |
| public < the option type T> OptionMap. | |
| public OptionMap. | |
| public OptionMap. | |
| public OptionMap. | |
| public OptionMap. | Returns: this builderthe key key, int... the values values)Set int values for an Integer sequence key. |
| public OptionMap. | Returns: this builderthe key key, long... the values values)Set long values for a Long sequence key. |
| public OptionMap. | Returns: this builderthe key key, boolean... the values values)Set boolean values for an Boolean sequence key. |
| public < the option type T> OptionMap. | Returns: this builderthe key key, T... the values values)Set a key-value pair, where the value is a sequence type. |
| list | back to summary |
|---|---|
| private List<OptionMap. | |
| Builder | back to summary |
|---|---|
| private Builder() | |
| add | back to summary |
|---|---|
| public OptionMap. Add all the entries of a map. Any keys of the map which are not valid
| |
| addAll | back to summary |
|---|---|
| public OptionMap. Add all entries from an existing option map to the one being built. Any keys which occur more than once in this builder will be overwritten with the last occurring value. | |
| copy | back to summary |
|---|---|
| private <T> void copy(Map<?, ?> map, Option<T> option) | |
| copy | back to summary |
|---|---|
| private <T> void copy(OptionMap optionMap, Option<T> option) | |
| getMap | back to summary |
|---|---|
| public OptionMap getMap() Build a map that reflects the current state of this builder.
| |
| parse | back to summary |
|---|---|
| public <T> OptionMap. Set a key-value pair, parsing the value from the given string. | |
| parse | back to summary |
|---|---|
| public <T> OptionMap. Set a key-value pair, parsing the value from the given string.
| |
| parseAll | back to summary |
|---|---|
| public OptionMap. Add all options from a properties file. Finds all entries which start with a given prefix followed by '.'; the remainder of the property key (after the prefix) is the option name, and the value is the option value. If the prefix does not end with '.' character, a '.' will be appended to it before parsing.
| |
| parseAll | back to summary |
|---|---|
| public OptionMap. Add all options from a properties file. Finds all entries which start with a given prefix followed by '.'; the remainder of the property key (after the prefix) is the option name, and the value is the option value. If the prefix does not end with '.' character, a '.' will be appended to it before parsing.
| |
| set | back to summary |
|---|---|
| public <T> OptionMap. Set a key-value pair. | |
| set | back to summary |
|---|---|
| public OptionMap. Set an int value for an Integer key. | |
| set | back to summary |
|---|---|
| public OptionMap. Set a long value for a Long key. | |
| set | back to summary |
|---|---|
| public OptionMap. Set a boolean value for a Boolean key. | |
| setSequence | back to summary |
|---|---|
| public OptionMap. Set int values for an Integer sequence key. | |
| setSequence | back to summary |
|---|---|
| public OptionMap. Set long values for a Long sequence key. | |
| setSequence | back to summary |
|---|---|
| public OptionMap. Set boolean values for an Boolean sequence key. | |
| setSequence | back to summary |
|---|---|
| public <T> OptionMap. Set a key-value pair, where the value is a sequence type. | |
| Access | Constructor and Description |
|---|---|
| private |
| option | back to summary |
|---|---|
| pack-priv Option<T> option | |
| value | back to summary |
|---|---|
| pack-priv T value | |
| OVPair | back to summary |
|---|---|
| private OVPair(final Option<T> option, final T value) | |