@Test public void testClear() { List<Integer> list = newList(); for (int i = 0; i < 20; i++) list.add(i * i); list.clear(); assertEquals(0, list.size()); list.add(- 1); list.add(- 8); list.add(-27); assertEquals(3, list.size()); assertEquals(- 1, (int)list.get(0)); assertEquals(- 8, (int)list.get(1)); assertEquals(-27, (int)list.get(2)); }
@SuppressWarnings("unchecked") public void clear() { root = (Node<E>)Node.EMPTY_LEAF; }
AvlTreeList extends AbstractList<E> { @SuppressWarnings("unchecked") public void clear() { root = (Node<E>)Node.EMPTY_LEAF; } }
AvlTreeList extends AbstractList<E> { @SuppressWarnings("unchecked") public void clear() { root = (Node<E>)Node.EMPTY_LEAF; } AvlTreeList();  AvlTreeList(Collection<? extends E> coll); }
AvlTreeList extends AbstractList<E> { @SuppressWarnings("unchecked") public void clear() { root = (Node<E>)Node.EMPTY_LEAF; } 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> { @SuppressWarnings("unchecked") public void clear() { root = (Node<E>)Node.EMPTY_LEAF; } 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();  }