日期:2014-05-20 浏览次数:20666 次
public boolean add(Object Data) { Node a = new Node(); a.data = Data; if(this.length==0) { this.head = a; this.tail = this.head; this.head.next = null; } else { Node p = this.head; while(p.next!=null) { if(p.data<=a.data) { a.next = p.next; p.next = a; } } } return false; }