valuesByKeyPrefix method
Iterates through TTMultiMap values for each key such
that only keys prefixed by keyMapping(
prefix
)
are included.
If keyMapping(
prefix
)
is empty then returns empty iterable.
See keysByPrefix for more information on result ordering, near neighbour search etc.
Combines individual Key->Values relations into a single flat ordering.
[['Card', 'card'],['Cat', 'cat', 'CAT']]
->
['Card', 'card','Cat', 'cat', 'CAT']
.
Throws ArgumentError if prefix
is empty or null.
Implementation
@override
TTIterable<V> valuesByKeyPrefix(String prefix,
{int maxPrefixEditDistance = 0}) {
final key = _mapKey(prefix);
final root = _root;
return (identical(root, null) || key.isEmpty)
? TTIterable<V>.empty()
: InOrderValuesIterable<V>(root, _version,
prefixSearchResult:
root.getClosestPrefixDescendant(key.runes.toList()),
maxPrefixEditDistance: maxPrefixEditDistance);
}