BkTree class

An approximate-match index over a set of strings.

Constructors

BkTree([StringDistance? distance])
Creates an index using distance (defaults to Damerau–Levenshtein). Audited: 2026-06-12 11:26 EDT

Properties

hashCode int
The hash code for this object.
no setterinherited
length int
Number of distinct words stored (duplicates are ignored). Audited: 2026-06-12 11:26 EDT
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String word) → void
Inserts word. A word already present (distance 0 to an existing node) is ignored, keeping the tree a set rather than a multiset.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Returns every stored word within edit distance maxDistance of query, in no particular order. Requires maxDistance >= 0. Audited: 2026-06-12 11:26 EDT
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited