text: public override void Build(IInputIterator tfit){if (tfit.HasPayloads){throw new System.ArgumentException("this suggester doesn't support payloads");}if (tfit.HasContexts){throw new System.ArgumentException("this suggester doesn't support contexts");}root = new TernaryTreeNode();if (tfit.Comparer != BytesRef.UTF8SortedAsUTF16Comparer){tfit = new SortedInputIterator(tfit, BytesRef.UTF8SortedAsUTF16Comparer);}List<string> tokens = new List<string>();List<object> vals = new List<object>();BytesRef spare;CharsRef charsSpare = new CharsRef();while ((spare = tfit.Next()) != null){charsSpare.Grow(spare.Length);UnicodeUtil.UTF8toUTF16(spare.Bytes, spare.Offset, spare.Length, charsSpare);tokens.Add(charsSpare.ToString());vals.Add(tfit.Weight);}autocomplete.BalancedTree(tokens.ToArray(), vals.ToArray(), 0, tokens.Count - 1, root);}