class FilteringStateChangeListenable implements StateChangeListenable<C> {

    @Override
    public void registerStateRemovedListener(CacheStateRemovedListener<? super C> listener) {
        backingListenable.registerStateChangeListener((old, updated) -> {
            C oldPlannable = mapAndFilter.apply(old);
            C updatedPlannable = mapAndFilter.apply(updated);
            if (oldPlannable != null && updatedPlannable == null) {
                listener.stateRemoved(oldPlannable);
            }
        });
    }

    public  FilteringStateChangeListenable(StateChangeListenable<T> backingListenable, Function<? super T, C> mapAndFilter);

}