public class ModifiableOptionValues extends OptionValues
OptionKeys that allows for key/value pairs to be
updated. Updates have atomic copy-on-write semantics which means a thread may see an old value
when reading but writers will never loose updates.| Modifier and Type | Field and Description |
|---|---|
static Object |
UNSET_KEY
Value that can be used in
ModifiableOptionValues.update(UnmodifiableEconomicMap) and
ModifiableOptionValues.update(OptionKey, Object) to remove an explicitly set value for a key such that
OptionKey.hasBeenSet(OptionValues) will return false for the key. |
| Constructor and Description |
|---|
ModifiableOptionValues(org.graalvm.collections.UnmodifiableEconomicMap<OptionKey<?>,Object> values) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
containsKey(OptionKey<?> key) |
protected <T> T |
get(OptionKey<T> key) |
org.graalvm.collections.UnmodifiableEconomicMap<OptionKey<?>,Object> |
getMap()
Gets an immutable view of the key/value pairs in this object.
|
void |
update(OptionKey<?> key,
Object value)
Updates this object with the given key/value pair.
|
void |
update(org.graalvm.collections.UnmodifiableEconomicMap<OptionKey<?>,Object> values)
Updates this object with the key/value pairs in
values. |
asMap, decodeNull, encodeNull, get, initMap, newOptionMap, printHelp, toString, toStringpublic static final Object UNSET_KEY
ModifiableOptionValues.update(UnmodifiableEconomicMap) and
ModifiableOptionValues.update(OptionKey, Object) to remove an explicitly set value for a key such that
OptionKey.hasBeenSet(OptionValues) will return false for the key.public void update(OptionKey<?> key, Object value)
ModifiableOptionValues.UNSET_KEYpublic void update(org.graalvm.collections.UnmodifiableEconomicMap<OptionKey<?>,Object> values)
values.ModifiableOptionValues.UNSET_KEYprotected <T> T get(OptionKey<T> key)
get in class OptionValuesprotected boolean containsKey(OptionKey<?> key)
containsKey in class OptionValuespublic org.graalvm.collections.UnmodifiableEconomicMap<OptionKey<?>,Object> getMap()
OptionValuesgetMap in class OptionValues