@Test public void testEdgeSets() { EventList<String> source = new BasicEventList<>(); source.add("Audi"); source.add("Audi"); source.add("Audi"); source.add("BMW"); source.add("Chevy"); source.add("Chevy"); source.add("Chevy"); source.add("Datsun"); SortedList<String> sortedList = SortedList.create(source); PopularityList<String> popularityList = PopularityList.create(source); new PopularityListValidator(popularityList, sortedList); source.set(2, "BMW"); source.set(1, "BMW"); source.set(0, "BMW"); source.set(6, "Datsun"); source.set(5, "Datsun"); source.set(4, "Datsun"); source.set(3, "Datsun"); source.set(2, "Datsun"); source.set(1, "Datsun"); source.set(0, "Datsun"); source.set(7, "Ford"); source.set(6, "Ford"); source.set(0, "Audi"); source.set(1, "BMW"); source.set(2, "BMW"); source.set(3, "BMW"); source.set(4, "BMW"); source.set(5, "Chevy"); source.set(4, "Chevy"); source.set(6, "Chevy"); source.set(7, "Chevy"); }
public static <E extends Comparable<? super E>> PopularityList<E> create(EventList<E> source) { return new PopularityList<>(UniqueList.create(source)); }
PopularityList extends TransformedList<E, E> { public static <E extends Comparable<? super E>> PopularityList<E> create(EventList<E> source) { return new PopularityList<>(UniqueList.create(source)); } }
PopularityList extends TransformedList<E, E> { public static <E extends Comparable<? super E>> PopularityList<E> create(EventList<E> source) { return new PopularityList<>(UniqueList.create(source)); } PopularityList(EventList<E> source);  PopularityList(EventList<E> source, Comparator<E> uniqueComparator); private  PopularityList(UniqueList<E> uniqueList); }
PopularityList extends TransformedList<E, E> { public static <E extends Comparable<? super E>> PopularityList<E> create(EventList<E> source) { return new PopularityList<>(UniqueList.create(source)); } PopularityList(EventList<E> source);  PopularityList(EventList<E> source, Comparator<E> uniqueComparator); private  PopularityList(UniqueList<E> uniqueList); static PopularityList<E> create(EventList<E> source); @Override void listChanged(ListEvent<E> listChanges); @Override void dispose(); }
PopularityList extends TransformedList<E, E> { public static <E extends Comparable<? super E>> PopularityList<E> create(EventList<E> source) { return new PopularityList<>(UniqueList.create(source)); } PopularityList(EventList<E> source);  PopularityList(EventList<E> source, Comparator<E> uniqueComparator); private  PopularityList(UniqueList<E> uniqueList); static PopularityList<E> create(EventList<E> source); @Override void listChanged(ListEvent<E> listChanges); @Override void dispose();  }