MapMixin<K, V> typedef

MapMixin<K, V> = MapBase<K, V>

Mixin implementing a Map.

This mixin has a basic implementation of all but five of the members of Map. A basic Map class can be implemented by mixin in this class and implementing keys, operator[], operator[]=, remove and clear. The remaining operations are implemented in terms of these five.

The keys iterable should have efficient Iterable.length and Iterable.contains operations, and it should catch concurrent modifications of the keys while iterating.

A more efficient implementation is usually possible by overriding some of the other members as well.

Implementation

// TODO: @Deprecated("Use MapBase instead")
// Longer term: Deprecate `Map` unnamed constructor, to allow using `Map`
// as skeleton class and replace `MapBase`.
typedef MapMixin<K, V> = MapBase<K, V>;