合并连接,this+=list,在this之后合并连接list中所有结点;设置list为空 代码有错
public CirDoublelyList addAll(CirDoublelyList<T> list) {
// CirDoublelyList<T> clist=new CirDoublelyList<T>(this);
if(this.head.prev!=this.head&&list.head.prev!=list.head) {
this.head.prev.next=list.head.next;
list.head.next.prev=this.head.prev;
list.head.prev.next=this.head;
this.head.prev=list.head.prev;
return this;
}
return null;
}