@Test public void testComplexEvents() { unsortedList = new BasicEventList<>(); TransactionList<Comparable> nestableList = new TransactionList<>(unsortedList); sortedList = SortedList.create(nestableList); ListConsistencyListener.install(sortedList); nestableList.beginEvent(); nestableList.addAll(GlazedListsTests.stringToList("ABCDEFG")); nestableList.commitEvent(); assertEquals(GlazedListsTests.stringToList("ABCDEFG"), nestableList); assertEquals(GlazedListsTests.stringToList("ABCDEFG"), sortedList); nestableList.beginEvent(false); nestableList.set(3, "H"); nestableList.add(0, "A"); nestableList.commitEvent(); assertEquals(GlazedListsTests.stringToList("AABCHEFG"), nestableList); assertEquals(GlazedListsTests.stringToList("AABCEFGH"), sortedList); nestableList.beginEvent(false); nestableList.add(0, "I"); nestableList.add(1, "A"); nestableList.set(5, "J"); nestableList.set(9, "K"); nestableList.commitEvent(); assertEquals(GlazedListsTests.stringToList("IAAABJHEFK"), nestableList); assertEquals(GlazedListsTests.stringToList("AAABEFHIJK"), sortedList); }
public static <E extends Comparable<? super E>> SortedList<E> create(EventList<E> source) { return new SortedList<>(source); }
SortedList extends TransformedList<E,E> { public static <E extends Comparable<? super E>> SortedList<E> create(EventList<E> source) { return new SortedList<>(source); } }
SortedList extends TransformedList<E,E> { public static <E extends Comparable<? super E>> SortedList<E> create(EventList<E> source) { return new SortedList<>(source); } SortedList(EventList<E> source);  SortedList(EventList<E> source, Comparator<? super E> comparator); }
SortedList extends TransformedList<E,E> { public static <E extends Comparable<? super E>> SortedList<E> create(EventList<E> source) { return new SortedList<>(source); } 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> { public static <E extends Comparable<? super E>> SortedList<E> create(EventList<E> source) { return new SortedList<>(source); } 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; }