Ejemplo n.º 1
0
 public static void PushBefore(DoubleLinkNode2 <T> after, DoubleLink2 <T> list)
 {
     if (after.IsAttach() && !list.IsEmpty())
     {
         DoubleLink2 <T> ._PushBefore(after, list);
     }
 }
Ejemplo n.º 2
0
 public static void PushAfter(DoubleLinkNode2 <T> before, DoubleLink2 <T> list)
 {
     if (before.IsAttach() && !list.IsEmpty())
     {
         DoubleLink2 <T> ._PushAfter(before, list);
     }
 }
Ejemplo n.º 3
0
        private static void _PushBefore(DoubleLinkNode2 <T> after, DoubleLink2 <T> list)
        {
            if (!list.IsEmpty())
            {
                DoubleLinkNode2 <T> next = list._root._next;
                DoubleLinkNode2 <T> pre  = list._root._pre;
                DoubleLink2 <T> ._Link(after._pre, next);

                DoubleLink2 <T> ._Link(pre, after);

                list._Init();
            }
        }
Ejemplo n.º 4
0
        private static void _PushAfter(DoubleLinkNode2 <T> before, DoubleLink2 <T> list)
        {
            if (!list.IsEmpty())
            {
                DoubleLinkNode2 <T> next  = list._root._next;
                DoubleLinkNode2 <T> pre   = list._root._pre;
                DoubleLinkNode2 <T> node3 = before._next;
                DoubleLink2 <T> ._Link(before, next);

                DoubleLink2 <T> ._Link(pre, node3);

                list._Init();
            }
        }