@Test public void testInsertManyEnd() { List<Integer> list = newList(); for (int i = 299999; i >= 0; i--) list.add(0, i); int i = 0; for (Integer x : list) { assertEquals((Integer)i, x); i++; } }
public void add(int index, E val) { if (index < 0 || index > size()) throw new IndexOutOfBoundsException(); if (size() == Integer.MAX_VALUE) throw new IllegalStateException("Maximum size reached"); root = root.insertAt(index, val); }
AvlTreeList extends AbstractList<E> { public void add(int index, E val) { if (index < 0 || index > size()) throw new IndexOutOfBoundsException(); if (size() == Integer.MAX_VALUE) throw new IllegalStateException("Maximum size reached"); root = root.insertAt(index, val); } }
AvlTreeList extends AbstractList<E> { public void add(int index, E val) { if (index < 0 || index > size()) throw new IndexOutOfBoundsException(); if (size() == Integer.MAX_VALUE) throw new IllegalStateException("Maximum size reached"); root = root.insertAt(index, val); } AvlTreeList();  AvlTreeList(Collection<? extends E> coll); }
AvlTreeList extends AbstractList<E> { public void add(int index, E val) { if (index < 0 || index > size()) throw new IndexOutOfBoundsException(); if (size() == Integer.MAX_VALUE) throw new IllegalStateException("Maximum size reached"); root = root.insertAt(index, val); } AvlTreeList();  AvlTreeList(Collection<? extends E> coll); int size(); E get(int index); E set(int index, E val); void add(int index, E val); E remove(int index); @SuppressWarnings("unchecked") void clear(); Iterator<E> iterator(); }
AvlTreeList extends AbstractList<E> { public void add(int index, E val) { if (index < 0 || index > size()) throw new IndexOutOfBoundsException(); if (size() == Integer.MAX_VALUE) throw new IllegalStateException("Maximum size reached"); root = root.insertAt(index, val); } AvlTreeList();  AvlTreeList(Collection<? extends E> coll); int size(); E get(int index); E set(int index, E val); void add(int index, E val); E remove(int index); @SuppressWarnings("unchecked") void clear(); Iterator<E> iterator();  }