public void Add(T key, U value) { int a = key.CompareTo(this.key); if (a > 0) { if (right != null) { right.Add(key, value); } else { right = new SorterNode() { key = key, value = value }; } } else { if (left != null) { left.Add(key, value); } else { left = new SorterNode() { key = key, value = value }; } } }
public void Add(T key, U value) { root.Add(key, value); }