Пример #1
0
 public void unlink() {
   if (next != null) next.prev = prev;
   if (prev != null) prev.next = next;
   if (parent.child == this) parent.child = next;
   if (parent.lchild == this) parent.lchild = prev;
   next = null;
   prev = null;
 }
Пример #2
0
 public void linkfirst() {
   if (parent.child != null) parent.child.prev = this;
   if (parent.lchild == null) parent.lchild = this;
   this.next = parent.child;
   parent.child = this;
 }
Пример #3
0
 public void link() {
   if (parent.lchild != null) parent.lchild.next = this;
   if (parent.child == null) parent.child = this;
   this.prev = parent.lchild;
   parent.lchild = this;
 }