class IntSet11a extends IntSet11 { // Adds a copy to sets implemented using linked lists // Copy method uses iteration public IntSet11a() { super(); } private IntSet11a(Cell l) { list=l; } public IntSet11a copy() { if(list==null) return new IntSet11a(null); else { Cell list1 = new Cell(list.first,null); Cell ptr1 = list1; for(Cell ptr=list; ptr.next!=null; ptr=ptr.next) { ptr1.next = new Cell(ptr.next.first,null); ptr1 = ptr1.next; } return new IntSet11a(list1); } } }