DomainTrie class
A Trie (prefix tree) data structure optimized for domain matching.
This implementation stores domains in reverse order (e.g., "com.example.ads") to enable efficient subdomain matching. Lookups are O(k) where k is the domain length, compared to O(n) for linear search.
Constructors
Properties
Methods
-
clear(
) → void - Clears all domains from the trie
-
contains(
String domain) → bool - Checks if a domain or any of its parent domains are in the trie
-
containsExact(
String domain) → bool - Checks if an exact domain is in the trie (no subdomain matching)
-
insert(
String domain) → void - Inserts a domain into the trie
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String domain) → bool - Removes a domain from the trie
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited