BuiltMap<K, V> class

The Built Collection Map.

It implements the non-mutating part of the Map interface. Iteration over keys is in the same order in which they were inserted. Modifications are made via MapBuilder.

See the Built Collection library documentation for the general properties of Built Collections.

Constructors

BuiltMap([dynamic map = const {}])
Instantiates with elements from a Map or BuiltMap. [...]
factory
BuiltMap.build(dynamic updates(MapBuilder<K, V>))
Creates a MapBuilder, applies updates to it, and builds.
factory
BuiltMap.from(Map map)
Instantiates with elements from a Map. [...]
factory
BuiltMap.of(Map<K, V> map)
Instantiates with elements from a Map<K, V>. [...]
factory

Properties

entries Iterable<MapEntry<K, V>>
As Map.entries.
read-only
hashCode int
Deep hashCode. [...]
read-only, override
isEmpty bool
As Map.isEmpty.
read-only
isNotEmpty bool
As Map.isNotEmpty.
read-only
keys Iterable<K>
As Map.keys, but result is stable; it always returns the same instance.
read-only
length int
As Map.length.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
values Iterable<V>
As Map.values, but result is stable; it always returns the same instance.
read-only

Methods

asMap() Map<K, V>
Returns as an immutable map. [...]
containsKey(Object key) bool
As Map.containsKey.
containsValue(Object value) bool
As Map.containsValue.
forEach(void f(K, V)) → void
As Map.forEach.
map<K2, V2>(MapEntry<K2, V2> f(K, V)) BuiltMap<K2, V2>
As Map.map, but returns a BuiltMap.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
rebuild(dynamic updates(MapBuilder<K, V>)) BuiltMap<K, V>
Converts to a MapBuilder, applies updates to it, and builds.
toBuilder() MapBuilder<K, V>
Converts to a MapBuilder for modification. [...]
toMap() Map<K, V>
Converts to a Map. [...]
toString() String
A string representation of this object. [...]
override

Operators

operator ==(dynamic other) bool
Deep equality. [...]
override
operator [](Object key) → V
As Map.