/** {@inheritDoc} */ @Override public E remove(int index) { if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot remove at " + index + " on list of size " + size()); updates.beginEvent(true); // remember the first duplicate E result = get(index); // remove all duplicates at this index int startIndex = getSourceIndex(index); int endIndex = getEndIndex(index); ((SortedList)source).subList(startIndex, endIndex).clear(); updates.commitEvent(); return result; }
/** {@inheritDoc} */ @Override public E remove(int index) { if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot remove at " + index + " on list of size " + size()); updates.beginEvent(true); // remember the first duplicate E result = get(index); // remove all duplicates at this index int startIndex = getSourceIndex(index); int endIndex = getEndIndex(index); ((SortedList)source).subList(startIndex, endIndex).clear(); updates.commitEvent(); return result; }
/** {@inheritDoc} */ @Override public E remove(int index) { if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot remove at " + index + " on list of size " + size()); updates.beginEvent(true); // remember the first duplicate E result = get(index); // remove all duplicates at this index int startIndex = getSourceIndex(index); int endIndex = getEndIndex(index); ((SortedList)source).subList(startIndex, endIndex).clear(); updates.commitEvent(); return result; }