示例#1
0
 // Add last element
 public void AddFirst(DoubleLink <T> link)
 {
     Debug.Assert(link != null);
     if (link.IsLinked)
     {
         link.Unlink();
     }
     link.LinkBefore(First);
 }
示例#2
0
 // Adds this element to a list, before the given element.
 public void LinkBefore(DoubleLink <T> link, DoubleLink <T> before)
 {
     Debug.Assert(link != null);
     Debug.Assert(before != null);
     link.LinkBefore(before);
 }