@Test public void testIterator() throws Exception { String[] strings = new String[] { "a", "b", "c", null, "a", "b", "c", "d" }; List<Object> list = new TypedList(stringListType, strings); Iterator<Object> i = list.iterator(); assertTrue(i.hasNext()); assertEquals("a", i.next()); assertEquals("b", i.next()); i.remove(); assertEquals("c", i.next()); assertEquals(null, i.next()); assertEquals("a", i.next()); assertEquals("b", i.next()); i.remove(); assertEquals("c", i.next()); assertEquals("d", i.next()); assertFalse(i.hasNext()); try { i.next(); fail(); } catch (NoSuchElementException e) { } }
public Iterator<Object> iterator() { return inner.iterator(); }
TypedList implements List<Object> { public Iterator<Object> iterator() { return inner.iterator(); } }
TypedList implements List<Object> { public Iterator<Object> iterator() { return inner.iterator(); } TypedList(final ListType type);  TypedList(final ListType type, final Collection<? extends Object> collection); @SuppressWarnings("unchecked")  TypedList(final ListType type, final Object array); }
TypedList implements List<Object> { public Iterator<Object> iterator() { return inner.iterator(); } TypedList(final ListType type);  TypedList(final ListType type, final Collection<? extends Object> collection); @SuppressWarnings("unchecked")  TypedList(final ListType type, final Object array); ListType getType(); Type getElementType(); void add(int index, Object element); boolean add(Object o); boolean addAll(Collection<? extends Object> c); boolean addAll(int index, Collection<? extends Object> c); void clear(); boolean contains(Object o); boolean containsAll(Collection<?> c); Object get(int index); int indexOf(Object o); boolean isEmpty(); Iterator<Object> iterator(); int lastIndexOf(Object o); ListIterator<Object> listIterator(); ListIterator<Object> listIterator(int index); Object remove(int index); boolean remove(Object o); boolean removeAll(Collection<?> c); boolean retainAll(Collection<?> c); Object set(int index, Object element); int size(); List<Object> subList(int fromIndex, int toIndex); Object[] toArray(); T[] toArray(T[] a); @Override int hashCode(); @Override boolean equals(Object obj); }
TypedList implements List<Object> { public Iterator<Object> iterator() { return inner.iterator(); } TypedList(final ListType type);  TypedList(final ListType type, final Collection<? extends Object> collection); @SuppressWarnings("unchecked")  TypedList(final ListType type, final Object array); ListType getType(); Type getElementType(); void add(int index, Object element); boolean add(Object o); boolean addAll(Collection<? extends Object> c); boolean addAll(int index, Collection<? extends Object> c); void clear(); boolean contains(Object o); boolean containsAll(Collection<?> c); Object get(int index); int indexOf(Object o); boolean isEmpty(); Iterator<Object> iterator(); int lastIndexOf(Object o); ListIterator<Object> listIterator(); ListIterator<Object> listIterator(int index); Object remove(int index); boolean remove(Object o); boolean removeAll(Collection<?> c); boolean retainAll(Collection<?> c); Object set(int index, Object element); int size(); List<Object> subList(int fromIndex, int toIndex); Object[] toArray(); T[] toArray(T[] a); @Override int hashCode(); @Override boolean equals(Object obj);  }