Trie<K, P extends Comparable<P>, V>.fromTrie constructor

Trie<K, P extends Comparable<P>, V>.fromTrie(
  1. Trie<K, P, V> other, {
  2. GetParts<K, P>? parts,
  3. TrieNode<K, P, V>? root,
})

Creates a Trie from another instance. Optionally redefines how the parts of the keys are computed and provides a custom root node.

Implementation

factory Trie.fromTrie(Trie<K, P, V> other,
        {GetParts<K, P>? parts, TrieNode<K, P, V>? root}) =>
    Trie<K, P, V>.fromMap(other, parts: parts ?? other._getParts, root: root);