ListMapView<K, V> class

A ListMapView lets you view a regular map as if it was a ListMap. At the moment this class is for FIC's internal use only, since a lot of its methods will throw UnsupportedError.

Implemented types
Available Extensions

Constructors

ListMapView(Map<K, V> _map)

Properties

entries Iterable<MapEntry<K, V>>
The map entries of this.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether there is no key/value pair in the map.
no setteroverride
isNotEmpty bool
Whether there is at least one key/value pair in the map.
no setteroverride
keys Iterable<K>
The keys of this.
no setteroverride
length int
The number of key/value pairs in the map.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable<V>
The values of this.
no setteroverride

Methods

addAll(Map other) → void
Adds all key/value pairs of other to this map.
override
addEntries(Iterable<MapEntry> newEntries) → void
Adds all key/value pairs of newEntries to this map.
override
cast<RK, RV>() ListMap<RK, RV>
Provides a view of this map as having RK keys and RV instances, if necessary.
override
clear() → void
Removes all entries from the map.
override
containsKey(covariant K? key) bool
Whether this map contains the given key.
override
containsValue(covariant V? value) bool
Whether this map contains the given value.
override
entry(K key) MapEntry<K, V>
Return the key/value entry for the given key, or throws if key is not in the map.
override
entryAt(int index) MapEntry<K, V>
Returns the indexth entry. The index must be non-negative and less than length. Index zero represents the first entry.
override
entryOrNull(K key) MapEntry<K, V>?
Return the key/value entry for the given key, or null if key is not in the map.
override
entryOrNullValue(K key) MapEntry<K, V?>
Return the key/value entry for the given key. If the key is not in the map, return MapEntry(key, null).
override
forEach(void f(K key, V value)) → void
Applies action to each key/value pair of the map.
override
get(covariant K key) → V?
The value for the given key, or null if key is not in the map.
override
getOrThrow(K key) → V
Returns the value if it exists, otherwise throws a StateError.
override
indexOfKey(K key, [int start = 0]) int
The first index of key in this list.
override
keyAt(int index) → K
Returns the indexth key. The index must be non-negative and less than length. Index zero represents the first key.
override
map<K2, V2>(MapEntry<K2, V2> f(K key, V value)) Map<K2, V2>
Returns a new map where all entries of this map are transformed by the given convert function.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putIfAbsent(K key, dynamic ifAbsent()) → V
Look up the value of key, or add a new entry if it isn't there.
override
remove(Object? key) → V
Removes key and its associated value, if present, from the map.
override
removeWhere(bool predicate(K key, V value)) → void
Removes all entries of this map that satisfy the given test.
override
shuffle([Random? random]) → void
Shuffles the keys of this map randomly.
override
sort([int compare(K a, K b)?]) → void
Sorts the keys of this map.
override
toString() String
A string representation of this object.
inherited
update(K key, dynamic update(V value), {dynamic ifAbsent()?}) → V
Updates the value for the provided key.
override
updateAll(V? update(K key, V value)) → void
Updates all values.
override
valueAt(int index) → V
Returns the indexth value. The index must be non-negative and less than length. Index zero represents the first value.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](covariant K key) → V?
The value for the given key, or null if key is not in the map.
override
operator []=(K key, V? value) → void
Replaces the value of a key that already exists in the map. However, if the key is not already present, this will throw an error.
override