ComputedMap<K, V> class
abstract
An in-memory, partially- or fully-observable key-value store.
Similar to the ObservableMap from the observable
package, but with the following upsides:
- Individual keys can be observed
- Supports immutable snapshots (using fast_immutable_collections)
- Available extensions
Constructors
-
ComputedMap.fromChangeStream(Computed<
ChangeEvent< stream)K, V> > -
factory
-
ComputedMap.fromChangeStreamWithPrev(ChangeEvent<
K, V> f(IMap<K, V> ?)) -
factory
-
ComputedMap.fromIMap(IMap<
K, V> m) -
factory
-
ComputedMap.fromSnapshotStream(Computed<
IMap< stream)K, V> > -
factory
Properties
-
changes
→ Computed<
ChangeEvent< K, V> > -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isEmpty
→ Computed<
bool> -
no setter
-
isNotEmpty
→ Computed<
bool> -
no setter
-
length
→ Computed<
int> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
snapshot
→ Computed<
IMap< K, V> > -
no setter
Methods
-
add(
K key, V value) → ComputedMap< K, V> -
addAll(
IMap< K, V> other) → ComputedMap<K, V> -
addAllComputed(
ComputedMap< K, V> other) → ComputedMap<K, V> -
cartesianProduct<
K2, V2> (ComputedMap< K2, V2> other) → ComputedMap<(K, K2), (V, V2)> -
cast<
RK, RV> () → ComputedMap< RK, RV> -
containsKey(
K key) → Computed< bool> -
containsValue(
V value) → Computed< bool> -
groupBy<
K2> (K2 key(K key, V value)) → ComputedMap< K2, ComputedMap< K, V> > -
groupByComputed<
K2> (Computed< K2> key(K key, V value)) → ComputedMap<K2, ComputedMap< K, V> > -
join<
V2> (ComputedMap< K, V2> other) → ComputedMap<K, (V, V2)> -
lookup<
V2> (ComputedMap< K, V2> other) → ComputedMap<K, (V, V2?)> -
map<
K2, V2> (MapEntry< K2, V2> convert(K key, V value)) → ComputedMap<K2, V2> -
mapComputed<
K2, V2> (Computed< Entry< convert(K key, V value)) → ComputedMap<K2, V2> >K2, V2> -
mapValues<
V2> (V2 convert(K key, V value)) → ComputedMap< K, V2> -
mapValuesComputed<
V2> (Computed< V2> convert(K key, V value)) → ComputedMap<K, V2> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putIfAbsent(
K key, V ifAbsent()) → ComputedMap< K, V> -
remove(
K key) → ComputedMap< K, V> -
removeWhere(
bool test(K key, V value)) → ComputedMap< K, V> -
removeWhereComputed(
Computed< bool> test(K key, V value)) → ComputedMap<K, V> -
toString(
) → String -
A string representation of this object.
inherited
-
update(
K key, V update(V value), {V ifAbsent()?}) → ComputedMap< K, V> -
updateAll(
V update(K key, V value)) → ComputedMap< K, V> -
updateAllComputed(
Computed< V> update(K key, V value)) → ComputedMap<K, V>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
K key) → Computed< V?>