public static void PushBefore(DoubleLinkNode2 <T> after, DoubleLink2 <T> list) { if (after.IsAttach() && !list.IsEmpty()) { DoubleLink2 <T> ._PushBefore(after, list); } }
public static void PushAfter(DoubleLinkNode2 <T> before, DoubleLink2 <T> list) { if (before.IsAttach() && !list.IsEmpty()) { DoubleLink2 <T> ._PushAfter(before, list); } }
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(); } }
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(); } }