@Test public void testGetCount() { source.add("A"); source.add("A"); source.add("A"); source.add("B"); source.add("C"); source.add("C"); assertEquals(3, unique.getCount(0)); assertEquals(1, unique.getCount(1)); assertEquals(2, unique.getCount(2)); assertEquals(3, unique.getCount("A")); assertEquals(1, unique.getCount("B")); assertEquals(2, unique.getCount("C")); assertEquals(0, unique.getCount("D")); }
public int getCount(int index) { int startIndex = getSourceIndex(index); int endIndex = getEndIndex(index); return endIndex - startIndex; }
UniqueList extends TransformedList<E, E> { public int getCount(int index) { int startIndex = getSourceIndex(index); int endIndex = getEndIndex(index); return endIndex - startIndex; } }
UniqueList extends TransformedList<E, E> { public int getCount(int index) { int startIndex = getSourceIndex(index); int endIndex = getEndIndex(index); return endIndex - startIndex; } UniqueList(EventList<E> source);  UniqueList(EventList<E> source, Comparator<? super E> comparator); private  UniqueList(SortedList<E> source, Void dummyParameter); }
UniqueList extends TransformedList<E, E> { public int getCount(int index) { int startIndex = getSourceIndex(index); int endIndex = getEndIndex(index); return endIndex - startIndex; } UniqueList(EventList<E> source);  UniqueList(EventList<E> source, Comparator<? super E> comparator); private  UniqueList(SortedList<E> source, Void dummyParameter); static UniqueList<E> create(EventList<E> source); void setComparator(Comparator<? super E> comparator); @Override int size(); @Override E remove(int index); @Override E set(int index, E value); @Override int indexOf(Object element); @Override void listChanged(ListEvent<E> listChanges); int getCount(int index); int getCount(E value); List<E> getAll(int index); List<E> getAll(E value); @Override void dispose(); }
UniqueList extends TransformedList<E, E> { public int getCount(int index) { int startIndex = getSourceIndex(index); int endIndex = getEndIndex(index); return endIndex - startIndex; } UniqueList(EventList<E> source);  UniqueList(EventList<E> source, Comparator<? super E> comparator); private  UniqueList(SortedList<E> source, Void dummyParameter); static UniqueList<E> create(EventList<E> source); void setComparator(Comparator<? super E> comparator); @Override int size(); @Override E remove(int index); @Override E set(int index, E value); @Override int indexOf(Object element); @Override void listChanged(ListEvent<E> listChanges); int getCount(int index); int getCount(E value); List<E> getAll(int index); List<E> getAll(E value); @Override void dispose();  }