void (@Nullable FilterPair<Filter1, Filter2> filter) { if (filter != null && filter.isEmpty()) filter = null; boolean anyFiltersDiffers = false; if (filterDiffers(filter, FilterPair::getFilter1, myFilter)) { triggerFilterSet(filter, FilterPair::getFilter1, myFilterKey1.getName()); anyFiltersDiffers = true; } if (filterDiffers(filter, FilterPair::getFilter2, myFilter)) { triggerFilterSet(filter, FilterPair::getFilter2, myFilterKey2.getName()); anyFiltersDiffers = true; } if (anyFiltersDiffers) { super.setFilter(filter); } }