PathTrie<T> class
Efficient prefix-based path lookup using a trie structure.
Each node corresponds to a single path segment. Values of type T can be
stored at any node.
Constructors
- PathTrie()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
findByPrefix(
String prefix) → List< (String, T)> -
Returns all
(path, value)pairs whose path starts withprefix. -
insert(
String path, T value) → void -
Inserts
valueat the givenpath. -
lookup(
String path) → T? -
Looks up the value stored at
path, ornullif none. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String path) → bool -
Removes the value stored at
path. Returnstrueif a value existed. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited