public void InsertAfter(SiblingNode <TKey, TValue> newSiblings) { var nextLocal = RightSibling; var lastTheir = newSiblings.LeftSibling; RightSibling = newSiblings; nextLocal.LeftSibling = lastTheir; // Opposite directions are set in setters }
public void InsertBefore(SiblingNode <TKey, TValue> newSiblings) { Debug.Assert(LeftSibling != null); LeftSibling.InsertAfter(newSiblings); }
private void Clear() { _leftSibling = null; _rightSibling = null; }