public void RootChanged(AListNode <K, T> newRoot, bool clear) { if (newRoot == null) { if (!clear && _items.Count != 0) { BadState(); } _items.Clear(); _nodes = null; } _root = newRoot; }