示例#1
0
 //---------------------------------------------------------------------
 public EbDoubleLinkNode2 <T> New()
 {
     if (mListNode.IsEmpty())
     {
         return(new EbDoubleLinkNode2 <T>(new T()));
     }
     else
     {
         EbDoubleLinkNode2 <T> node = mListNode.GetHead();
         node.Detach();
         return(node);
     }
 }
示例#2
0
 //-------------------------------------------------------------------------
 public static void PushBefore(EbDoubleLinkNode2 <T> after, EbDoubleLinkNode2 <T> node)
 {
     node.Detach();
     _PushBefore(after, node);
 }
示例#3
0
 //-------------------------------------------------------------------------
 public static void PushAfter(EbDoubleLinkNode2 <T> before, EbDoubleLinkNode2 <T> node)
 {
     node.Detach();
     _PushAfter(before, node);
 }
示例#4
0
 //-------------------------------------------------------------------------
 public void PushFront(EbDoubleLinkNode2 <T> node)
 {
     node.Detach();
     _PushAfter(_root, node);
 }
示例#5
0
 //-------------------------------------------------------------------------
 public void PushBack(EbDoubleLinkNode2 <T> node)
 {
     node.Detach();
     _PushBefore(_root, node);
 }