public override void SwapValue(RBTree.Node other) { SortedDictionary <TKey, TValue> .Node node = (SortedDictionary <TKey, TValue> .Node)other; TKey key = this.key; this.key = node.key; node.key = key; TValue obj = this.value; this.value = node.value; node.value = obj; }
public void Add(TKey key, TValue value) { if ((object)key == null) { throw new ArgumentNullException("key"); } RBTree.Node new_node = (RBTree.Node) new SortedDictionary <TKey, TValue> .Node(key, value); if (this.tree.Intern <TKey>(key, new_node) != new_node) { throw new ArgumentException("key already present in dictionary", "key"); } }
public int Compare(TKey key, RBTree.Node node) { return(this.cmp.Compare(key, ((SortedDictionary <TKey, TValue> .Node)node).key)); }
public abstract void SwapValue(RBTree.Node other);