@Test public void testIteratorIsConsistent() { ListConsistencyListener.install(sortedList); unsortedList.addAll(Arrays.asList("d", "c", "a", "b")); Iterator<Comparable> iterator = sortedList.iterator(); assertEquals("a", iterator.next()); assertEquals("a", sortedList.get(0)); assertEquals("b", iterator.next()); assertEquals("b", sortedList.get(1)); assertEquals("c", iterator.next()); assertEquals("c", sortedList.get(2)); assertEquals("d", iterator.next()); assertEquals("d", sortedList.get(3)); }
@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; }