protected Set<DependencyKind> removeDependency(Node n){
  Set<DependencyKind> removedKinds=new HashSet<>();
  for (  DependencyKind dk : DependencyKind.values()) {
    Set<Node> depsByKind=deps.get(dk);
    if (depsByKind == null)     continue;
    if (depsByKind.remove(n)) {
      removedKinds.add(dk);
    }
  }
  return removedKinds;
}

protected Set < DependencyKind > removeDependency ( Node n ) { Set < DependencyKind > removedKinds = new HashSet < > ( ) ; for ( DependencyKind dk : DependencyKind . values ( ) ) { Set < Node > depsByKind = deps . get ( dk ) ; if ( depsByKind == null ) continue ; if ( depsByKind . remove ( n ) ) { removedKinds . add ( dk ) ; } } return removedKinds ; }
remove a dependency , regardless of its kind .
