abstract class Mutable extends TunableMap
A TunableMap that can be updated via put and clear operations. Putting
a value for a given id will update the current value for the id, 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 from TunableMap.apply will produce an updated value when
Tunable.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 calling Tunable.apply() on a previously retrieved Tunable produces
None. This behavior is desirable because a Tunable's value may be cleared and re-set,
and we want Tunable applications to see those updates.
- Alphabetic
- By Inheritance
- Mutable
- TunableMap
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Mutable()
Abstract Value Members
-
abstract
def
apply[T](key: Key[T]): Tunable[T]
Returns a Tunable for the given
key.idin the TunableMap.Returns a Tunable for the given
key.idin the TunableMap. If the Tunable is not of typeTor a subclass of typeT, throws aClassCastException- Definition Classes
- TunableMap
-
abstract
def
clear[T](key: Key[T]): Unit
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. -
abstract
def
entries: Iterator[Entry[_]]
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.
- Definition Classes
- TunableMap
-
abstract
def
put[T](id: String, clazz: Class[T], value: T): Key[T]
Java-friendly API
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
++=(that: TunableMap): Unit
Add all entries in
thatTunableMap to this TunableMap.Add all entries in
thatTunableMap 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. -
def
--=(that: TunableMap): Unit
Remove all entries by key in
thatTunableMap from this TunableMap.Remove all entries by key in
thatTunableMap from this TunableMap. Removal of each Tunable in the map are atomic, but the change is not atomic at the macro level. -
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
contentString: String
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.
- Definition Classes
- TunableMap
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
orElse(that: TunableMap): TunableMap
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.
- Definition Classes
- TunableMap
-
final
def
put[T](id: String, value: T)(implicit m: Manifest[T]): Key[T]
Put a Tunable with id
idand valuevalueinto the TunableMap.Put a Tunable with id
idand valuevalueinto the TunableMap. If the Tunable for thatidalready exists, update the value tovalue. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()