Trie<K, P extends Comparable<P> , V>.fromIterable constructor
Trie<K, P extends Comparable<P> , V>.fromIterable (})
Creates a Trie from an iterable (and possible transformation functions).
The parts
define how the keys are computed and optionally provides a
custom root
node.
Implementation
factory Trie.fromIterable/*<E>*/(
Iterable<Object?> /*Iterable<E>*/ iterable, {
required GetParts<K, P> parts,
TrieNode<K, P, V>? root,
K Function(Object? /*E*/ element)? key,
V Function(Object? /*E*/ element)? value,
}) =>
Trie<K, P, V>.fromIterables(
key == null ? iterable.cast<K>() : iterable.map(key),
value == null ? iterable.cast<V>() : iterable.map(value),
parts: parts,
root: root);