for (Map.Entry<TClass, Map<TClass,TCast>> origEntry : castsBySource.entrySet()) {
final TClass source = origEntry.getKey();
Map<TClass, TCast> filteredView = Maps.filterKeys(origEntry.getValue(), new Predicate<TClass>() {
@Override
public boolean apply(TClass target) {
return (source == target) || strongCasts.contains(new TCastIdentifier(source, target));
}
});
assert ! filteredView.isEmpty() : "no strong casts (including self casts) found for " + source;
result.put(source, new HashMap<>(filteredView));
}