@Test public void testHandleUpdateEvents() { EventList<String> source = new BasicEventList<>(); SeparatorList<String> separated = new SeparatorList<>(source, String.CASE_INSENSITIVE_ORDER, 1, Integer.MAX_VALUE); ListConsistencyListener<String> listConsistencyListener = ListConsistencyListener.install(separated); listConsistencyListener.setPreviousElementTracked(false); source.addAll(0, GlazedListsTests.stringToList("AAAA")); assertEquals(listConsistencyListener.getEventCount(), 1); source.set(3, "a"); assertEquals(listConsistencyListener.getEventCount(), 2); ((SeparatorList.Separator)(Object)separated.get(0)).setLimit(0); assertEquals(listConsistencyListener.getEventCount(), 3); assertEquals(1, separated.size()); source.set(2, "a"); assertEquals(listConsistencyListener.getEventCount(), 4); assertEquals(1, separated.size()); }
@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();  }