@Test public void testRemoveInsertSeparators() { BasicEventList<String> source = new BasicEventList<>(); source.addAll(GlazedListsTests.stringToList("AABBBCCCCDDDDEFGHHHH")); SeparatorList<String> separatorList = new SeparatorList<>(source, GlazedLists.comparableComparator(), 0, Integer.MAX_VALUE); ListConsistencyListener<String> listConsistencyListener = ListConsistencyListener.install(separatorList); listConsistencyListener.setPreviousElementTracked(false); assertEqualsIgnoreSeparators(source, separatorList, GlazedLists.comparableComparator()); source.removeAll(GlazedListsTests.stringToList("BC")); source.removeAll(GlazedListsTests.stringToList("H")); assertEqualsIgnoreSeparators(source, separatorList, GlazedLists.comparableComparator()); source.addAll(2, GlazedListsTests.stringToList("BBBBCCC")); source.addAll(source.size(), GlazedListsTests.stringToList("HHHH")); assertEqualsIgnoreSeparators(source, separatorList, GlazedLists.comparableComparator()); collapseThenExpandAllSeparators(source, separatorList); source.remove(12); source.remove(9); source.remove(10); source.remove(9); assertEqualsIgnoreSeparators(source, separatorList, GlazedLists.comparableComparator()); source.remove(10); source.remove(9); assertEqualsIgnoreSeparators(source, separatorList, GlazedLists.comparableComparator()); source.add(9, "F"); source.add(9, "E"); collapseThenExpandAllSeparators(source, separatorList); ((SeparatorList.Separator)(Object)separatorList.get(18)).setLimit(0); source.remove(12); source.remove(14); source.remove(12); ((SeparatorList.Separator)(Object)separatorList.get(18)).setLimit(Integer.MAX_VALUE); assertEqualsIgnoreSeparators(source, separatorList, GlazedLists.comparableComparator()); source.add(12, "H"); assertEqualsIgnoreSeparators(source, separatorList, GlazedLists.comparableComparator()); }
@Override public int size() { return collapsedElements.colourSize(Barcode.BLACK); }
SeparatorList extends TransformedList<E, E> { @Override public int size() { return collapsedElements.colourSize(Barcode.BLACK); } }
SeparatorList extends TransformedList<E, E> { @Override public int size() { return collapsedElements.colourSize(Barcode.BLACK); } SeparatorList(EventList<E> source, Comparator<? super E> comparator, int minimumSizeForSeparator, int defaultLimit); }
SeparatorList extends TransformedList<E, E> { @Override public int size() { return collapsedElements.colourSize(Barcode.BLACK); } SeparatorList(EventList<E> source, Comparator<? super E> comparator, int minimumSizeForSeparator, int defaultLimit); @Override int size(); void setComparator(Comparator<E> comparator); @Override void listChanged(ListEvent<E> listChanges); @Override void dispose(); }
SeparatorList extends TransformedList<E, E> { @Override public int size() { return collapsedElements.colourSize(Barcode.BLACK); } SeparatorList(EventList<E> source, Comparator<? super E> comparator, int minimumSizeForSeparator, int defaultLimit); @Override int size(); void setComparator(Comparator<E> comparator); @Override void listChanged(ListEvent<E> listChanges); @Override void dispose();  }