@Test public void testIteratorReadOnly() { sortedList.add("Riders"); sortedList.add("Stampeders"); sortedList.add("Bombers"); sortedList.add("Eskimos"); sortedList.add("Argos"); sortedList.add("Ti-Cats"); sortedList.add("Renegades"); sortedList.add("Als"); String[] expected = {"Als", "Argos", "Bombers", "Eskimos", "Renegades", "Riders", "Stampeders", "Ti-Cats"}; int counter = 0; for(Iterator i = sortedList.iterator(); i.hasNext(); counter++) { assertEquals(expected[counter], i.next()); } assertEquals(expected.length, counter); }
@Override public Iterator<E> iterator() { return new SortedListIterator(); }
SortedList extends TransformedList<E,E> { @Override public Iterator<E> iterator() { return new SortedListIterator(); } }
SortedList extends TransformedList<E,E> { @Override public Iterator<E> iterator() { return new SortedListIterator(); } SortedList(EventList<E> source);  SortedList(EventList<E> source, Comparator<? super E> comparator); }
SortedList extends TransformedList<E,E> { @Override public Iterator<E> iterator() { return new SortedListIterator(); } SortedList(EventList<E> source);  SortedList(EventList<E> source, Comparator<? super E> comparator); static SortedList<E> create(EventList<E> source); void setMode(int mode); int getMode(); @Override void listChanged(ListEvent<E> listChanges); Comparator<? super E> getComparator(); void setComparator(Comparator<? super E> comparator); @Override int indexOf(Object object); @Override int lastIndexOf(Object object); int sortIndex(Object object); int lastSortIndex(Object object); @Deprecated int indexOfSimulated(Object object); @Override boolean contains(Object object); @Override Iterator<E> iterator(); }
SortedList extends TransformedList<E,E> { @Override public Iterator<E> iterator() { return new SortedListIterator(); } SortedList(EventList<E> source);  SortedList(EventList<E> source, Comparator<? super E> comparator); static SortedList<E> create(EventList<E> source); void setMode(int mode); int getMode(); @Override void listChanged(ListEvent<E> listChanges); Comparator<? super E> getComparator(); void setComparator(Comparator<? super E> comparator); @Override int indexOf(Object object); @Override int lastIndexOf(Object object); int sortIndex(Object object); int lastSortIndex(Object object); @Deprecated int indexOfSimulated(Object object); @Override boolean contains(Object object); @Override Iterator<E> iterator(); static final int STRICT_SORT_ORDER; static final int AVOID_MOVING_ELEMENTS; }