class GraphCycleDetector {

    public void removeRelations(String child, Collection<String> parents) {
        for (String parent : parents) {
            childToParents.removeMapping(child, parent);
            parentToChildren.removeMapping(parent, child);
        }
    }

}