public boolean hasOutputNode(Set<String> variables){
  for (  String outputNode : getOutputNodesIds()) {
    if (variables.contains(outputNode)) {
      return true;
    }
  }
  return false;
}

public boolean hasOutputNode ( Set < String > variables ) { for ( String outputNode : getOutputNodesIds ( ) ) { if ( variables . contains ( outputNode ) ) { return true ; } } return false ; }
returns true if the node has at least one output node in the set of identifiers provided as argument
