@Test public void testSet() { EventList<String> source = new BasicEventList<>(); SeparatorList<String> separated = new SeparatorList<>(source, String.CASE_INSENSITIVE_ORDER, 1, Integer.MAX_VALUE); source.addAll(GlazedListsTests.stringToList("ABCABCABC")); assertEquals(9, source.size()); assertEquals(12, separated.size()); assertEquals("A", source.get(0)); assertEquals("A", separated.get(1)); separated.set(1, "D"); assertEqualsIgnoreSeparators(source, separated, String.CASE_INSENSITIVE_ORDER); assertEquals("B", source.get(4)); assertEquals("B", separated.get(5)); separated.set(5, "E"); assertEqualsIgnoreSeparators(source, separated, String.CASE_INSENSITIVE_ORDER); assertEquals("C", source.get(8)); assertEquals("C", separated.get(9)); separated.set(9, "F"); assertEqualsIgnoreSeparators(source, separated, String.CASE_INSENSITIVE_ORDER); try { separated.set(0, "This will fail"); fail("failed to receive an IllegalArgumentException when accessing an index that stores a separator"); } catch (IllegalArgumentException 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 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();  }