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; }
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; }
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; }