public void add(iterator <T> tar, int startOfMe, int startOfTar, int num)//从DoubleLinkedList复制并插入元素 { if (!tar.pos.avaluable) { return; } int count = 0; iterator <T> tar2 = new iterator <T>(tar + startOfTar); if (!pos.avaluable) { pos = new DoubleLinkedNode(tar2[0]); tar2++; count++; } DoubleLinkedNode first = findPotion(pos, startOfMe); do { if (count >= num) { break; } DoubleLinkedNode now = new DoubleLinkedNode(tar2[0], first, first.Next); tar2++; count++; first = now; } while (!tar2.Equal(tar + startOfTar)); }
public void add(iterator <T> tar)//从DoubleLinkedList复制并插入元素 { if (!tar.pos.avaluable) { return; } iterator <T> tar2 = new iterator <T>(tar); if (!pos.avaluable) { pos = new DoubleLinkedNode(tar2[0]); tar2++; } DoubleLinkedNode first = pos.Last; do { DoubleLinkedNode now = new DoubleLinkedNode(tar2[0], first, first.Next); tar2++; first = now; } while (!tar2.Equal(tar)); }