void () { removeAllElements(); int count = 0; Collection<T> elements = getElementsToFilter(); for (T elt : elements) { if (passElement(elt)) { addToFiltered(elt); count++; } } if (count > 0) { fireIntervalAdded(this, 0, count - 1); } }