question: 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 ; }
target:  Remove a dependency, regardless of its kind.