BuiltMap<K, V> class
abstract
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.
no setter
- hashCode → int
-
Deep hashCode.
no setteroverride
- isEmpty → bool
-
As Map.isEmpty.
no setter
- isNotEmpty → bool
-
As Map.isNotEmpty.
no setter
-
keys
→ Iterable<
K> -
As Map.keys, but result is stable; it always returns the same instance.
no setter
- length → int
-
As Map.length.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
values
→ Iterable<
V> -
As Map.values, but result is stable; it always returns the same
instance.
no setter
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 nonexistent 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 ==(
Object other) → bool -
Deep equality.
override
-
operator [](
Object? key) → V? - As Map.