void (@NotNull Collection<T> items) { if (currentItems != null && currentItems.containsAll(items) && currentItems.size() == items.size()) { //currentItems unchanged => no need to re-evaluate processed & unprocessed return; } currentItems = CollectionFactory.createSmallMemoryFootprintSet(items); processedItems = new ArrayDeque<>(intersection(processedItems, currentItems)); unprocessedItems = new ArrayDeque<>(subtract(currentItems, processedItems)); }