Returns a Tunable for the given key.id
in the TunableMap.
Returns a Tunable for the given key.id
in the TunableMap. If the Tunable is not
of type T
or a subclass of type T
, throws a ClassCastException
Clear a Tunable in TunableMap.
Clear a Tunable in TunableMap. This does not remove the Tunable from the Map, but
rather clears its value such that applying it will produce None
.
Returns an Iterator over TunableMap.Entry for each Tunable in the map with a value.
Returns an Iterator over TunableMap.Entry for each Tunable in the map with a value.
Java-friendly API
Add all entries in that
TunableMap to this TunableMap.
Add all entries in that
TunableMap to this TunableMap. Entries already present in
this map are updated. Updates to each Tunable in the map are atomic, but the change
is not atomic at the macro level.
Remove all entries by key in that
TunableMap from this TunableMap.
Remove all entries by key in that
TunableMap from this TunableMap. Removal of each
Tunable in the map are atomic, but the change is not atomic at the macro level.
Returns a String representation of a TunableMap, in the form: TunableMap(id1 -> value1, id2 -> value2)
Returns a String representation of a TunableMap, in the form: TunableMap(id1 -> value1, id2 -> value2)
Entries are sorted alphabetically by id.
Compose this TunableMap with another TunableMap.
Compose this TunableMap with another TunableMap. Tunables retrieved from the composed map prioritize the values of Tunables in the this map over the other TunableMap.
Put a Tunable with id id
and value value
into the TunableMap.
Put a Tunable with id id
and value value
into the TunableMap. If the Tunable
for that id
already exists, update the value to value
.
A TunableMap that can be updated via
put
andclear
operations. Putting a value for a givenid
will update the current value for theid
, or create a new Tunable if it does not exist. The type of the new value must match that of the existing value, or a ClassCastException will be thrown.apply
returns a Tunable for a given TunableMap.Key and creates it if does not already exist. Updates to the TunableMap update the underlying Tunables; for example, a Tunable returned fromTunableMap.apply
will produce an updated value whenTunable.apply()
is called if the TunableMap is updated.clear
clears the underlying Tunable for a given TunableMap.Key but does not remove it from the map; this has the effect that callingTunable.apply()
on a previously retrieved Tunable producesNone
. This behavior is desirable because a Tunable's value may be cleared and re-set, and we want Tunable applications to see those updates.