}
return keys;
}
public ReferrerCounts getReferrerCounts( ReferrerCounts persisted ) {
MutableReferrerCounts mutable = persisted != null ? persisted.mutable() : ReferrerCounts.createMutable();
for (Set<NodeKey> sourceKeys : addedStrong.values()) {
for (NodeKey key : sourceKeys) {
mutable.addStrong(key, 1);
}
}
for (Set<NodeKey> sourceKeys : addedWeak.values()) {
for (NodeKey key : sourceKeys) {
mutable.addWeak(key, 1);
}
}
for (Set<NodeKey> sourceKeys : removedStrong.values()) {
for (NodeKey key : sourceKeys) {
mutable.addStrong(key, -1);
}
}
for (Set<NodeKey> sourceKeys : removedWeak.values()) {
for (NodeKey key : sourceKeys) {
mutable.addWeak(key, -1);
}
}
return mutable.freeze();
}