public ViDoubleLinkNode2 <T> New() { if (_nodes.IsEmpty()) { return(new ViDoubleLinkNode2 <T>(new T())); } else { ViDoubleLinkNode2 <T> node = _nodes.GetHead(); node.Detach(); return(node); } }
//------------------------------------------------------------------------- public static void PushBefore(ViDoubleLinkNode2 <T> after, ViDoubleLinkNode2 <T> node) { node.Detach(); _PushBefore(after, node); }
//------------------------------------------------------------------------- public static void PushAfter(ViDoubleLinkNode2 <T> before, ViDoubleLinkNode2 <T> node) { node.Detach(); _PushAfter(before, node); }
//------------------------------------------------------------------------- public void PushFront(ViDoubleLinkNode2 <T> node) { node.Detach(); _PushAfter(_root, node); }
//------------------------------------------------------------------------- public void PushBack(ViDoubleLinkNode2 <T> node) { node.Detach(); _PushBefore(_root, node); }