Esempio n. 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;
 }
Esempio n. 2
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;
 }