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 with prefix.
insert(String path, T value) → void
Inserts value at the given path.
lookup(String path) → T?
Looks up the value stored at path, or null if 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. Returns true if a value existed.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited