protected boolean isLeaf(){
  Set<Node> allDeps=getDependencies(DependencyKind.BOUND,DependencyKind.STUCK);
  if (allDeps.isEmpty())   return true;
  for (  Node n : allDeps) {
    if (n != this) {
      return false;
    }
  }
  return true;
}

protected boolean isLeaf ( ) { Set < Node > allDeps = getDependencies ( DependencyKind . BOUND , DependencyKind . STUCK ) ; if ( allDeps . isEmpty ( ) ) return true ; for ( Node n : allDeps ) { if ( n != this ) { return false ; } } return true ; }
is this node a leaf ? this means either the node has no dependencies , or it just has self - dependencies .
