keysByPrefix abstract method
Iterates through TTMultiMap keys such
that only keys prefixed by keyMapping(
prefix
)
are included.
- If keyMapping
(
prefix
)
is empty then returns empty Iterable. - If
maxPrefixEditDistance
> 0 then search will expand to all keys whose prefix is within a Hamming edit distance ofmaxPrefixEditDistance
or less. For example searching for prefix 'cow' withmaxPrefixEditDistance
= 2 may give: cow,cowboy, chicken, crocodile, canary, cat, dog, donkey, goat, hawk, horse, zonkey
Results are ordered by key as:
- Results where key is prefixed by
prefix
(i.e. prefixEditDistance == 0) ordered lexicographically. - Results of increasing edit distance ordered lexographically.
Throws ArgumentError if prefix
is empty or null.
Implementation
TTIterable<String> keysByPrefix(String prefix,
{int maxPrefixEditDistance = 0});