DOMTreeReferenceMap<V> class

A TreeReferenceMap for DOM Nodes.

Constructors

DOMTreeReferenceMap(Node root, {bool autoPurge = false, bool keepPurgedKeys = false, Duration? purgedEntriesTimeout, int? maxPurgedEntries})

Properties

autoPurge bool
If true, each operation performs a purge.
finalinherited
childChecker → (bool Function(Node parent, Node child, bool deep)?)
The Function that returns true if parent has child.
finalinherited
childrenGetter → (Iterable<Node> Function(Node key)?)
The Function that returns the children of a key.
finalinherited
entries Iterable<MapEntry<Node, V>>
The map entries of this.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
invalidEntries List<MapEntry<Node, V>>
Returns the invalid entries.
no setterinherited
invalidKeys List<Node>
Returns the invalid keys.
no setterinherited
isEmpty bool
Whether there is no key/value pair in the map.
no setterinherited
isNotEmpty bool
Whether there is at least one key/value pair in the map.
no setterinherited
keepPurgedEntries bool
Will stored purged entries in a separated Map.
finalinherited
keys Iterable<Node>
The keys of this.
no setterinherited
keysReversed List<Node>
Returns keys reversed (unmodifiable);
no setterinherited
length int
The number of key/value pairs in the map.
no setterinherited
maxPurgedEntries int?
Maximum number of purged entries.
finalinherited
parentGetter → (Node? Function(Node key)?)
The Function that returns the parent of a key.
finalinherited
purgedEntries List<MapEntry<Node, V>>
Returns the purged entries. Only relevant if keepPurgedEntries is true.
no setterinherited
purgedEntriesCount int
no setterinherited
purgedEntriesTimeout Duration?
Purged entries timeout.
finalinherited
purgedKeys List<Node>
Returns the purged keys. Only relevant if keepPurgedEntries is true.
no setterinherited
purgedKeysReversed List<Node>
Returns purgedKeys reversed (unmodifiable);
no setterinherited
purgedLength int
Returns the purged entries length. Only relevant if keepPurgedEntries is true.
no setterinherited
revalidatedPurgedEntriesCount int
no setterinherited
root Node
The root of the Tree Reference.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validEntries List<MapEntry<Node, V>>
Returns the valid entries.
no setterinherited
validKeys List<Node>
Returns the valid keys.
no setterinherited
values Iterable<V>
The values of this.
no setterinherited

Methods

addAll(Map<Node, V> other) → void
Adds all key/value pairs of other to this map.
inherited
addEntries(Iterable<MapEntry<Node, V>> newEntries) → void
Adds all key/value pairs of newEntries to this map.
inherited
cast<RK, RV>() Map<RK, RV>
Provides a view of this map as having RK keys and RV instances, if necessary.
inherited
checkPurgedEntriesTimeout() → void
Remove expired purged entries. Only relevant if purgedEntriesTimeout is not null.
inherited
checkPurgeEntriesLimit() → void
Removed purged entries over maxPurgedEntries limit.
inherited
clear() → void
Removes all entries from the map.
inherited
containsKey(Object? key) bool
Whether this map contains the given key.
inherited
containsValue(Object? value) bool
Whether this map contains the given value.
inherited
disposePurgedEntries() → void
Disposes purged entries. Only relevant if keepPurgedEntries is true.
inherited
doAutoPurge() → void
Same as purge, but called automatically by many operations.
inherited
forEach(void f(Node key, V value)) → void
Applies action to each key/value pair of the map.
inherited
get(Node key) → V?
inherited
getAlsoFromPurgedEntries(Node key) → V?
inherited
getChildrenOf(Node? key) Iterable<Node>
Returns the children of key.
getFromPurgedEntries(Node? key) → V?
Returns key value from purged entries. Only relevant if keepPurgedEntries is true.
inherited
getParentKey(Node? child, {bool includePurgedEntries = false}) Node?
Get 1st parent key of child;
inherited
getParentOf(Node? key) Node?
Returns the parent of key.
getParentValue(Node? child, {bool includePurgedEntries = false}) → V?
Get 1st parent value of child;
inherited
getSubValues(Node? key, {bool includePurgedEntries = false}) List<V>
Return sub values of key.
inherited
isChildOf(Node? parent, Node? child, bool deep) bool
Returns true if parent has child. If deep is true, will check sub nodes children.
isInTree(Node? key) bool
Returns true if key is in the tree.
isValidEntry(Node key, V value) bool
Returns true if key is valid (in the tree).
inherited
map<K2, V2>(MapEntry<K2, V2> f(Node key, V value)) Map<K2, V2>
Returns a new map where all entries of this map are transformed by the given convert function.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
purge() → TreeReferenceMap<Node, V>
Remove all invalidKeys.
inherited
put(Node key, V value) → void
inherited
putIfAbsent(Node key, V ifAbsent()) → V
Look up the value of key, or add a new entry if it isn't there.
inherited
remove(Object? key) → V?
Removes key and its associated value, if present, from the map.
inherited
removeWhere(bool predicate(Node key, V value)) → void
Removes all entries of this map that satisfy the given test.
inherited
revalidatePurgedEntries() int
Restore purged entries that are currently valid. Only relevant if keepPurgedEntries is true.
inherited
toString() String
A string representation of this object.
inherited
update(Node key, V update(V value), {V ifAbsent()?}) → V
Updates the value for the provided key.
inherited
updateAll(V update(Node key, V value)) → void
Updates all values.
inherited
walkTree<R>(R walker(Node node), {Node? root}) → R?
Walks tree from root and stops when walker returns some R object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](Object? key) → V?
The value for the given key, or null if key is not in the map.
inherited
operator []=(Node key, V value) → void
Associates the key with the given value.
inherited