public BNode removeNode(String nodeId){
  if (!nodes.containsKey(nodeId)) {
  }
 else {
    BNode node=nodes.get(nodeId);
    for (    BNode inputNode : node.getInputNodes()) {
      node.removeInputNode(inputNode.getId());
    }
    for (    BNode outputNode : node.getOutputNodes()) {
      outputNode.removeInputNode(nodeId);
    }
    if (node instanceof ChanceNode) {
      chanceNodes.remove(nodeId);
    }
 else     if (node instanceof UtilityNode) {
      utilityNodes.remove(nodeId);
    }
 else     if (node instanceof ActionNode) {
      actionNodes.remove(nodeId);
    }
  }
  return nodes.remove(nodeId);
}

public BNode removeNode ( String nodeId ) { if ( ! nodes . containsKey ( nodeId ) ) { } else { BNode node = nodes . get ( nodeId ) ; for ( BNode inputNode : node . getInputNodes ( ) ) { node . removeInputNode ( inputNode . getId ( ) ) ; } for ( BNode outputNode : node . getOutputNodes ( ) ) { outputNode . removeInputNode ( nodeId ) ; } if ( node instanceof ChanceNode ) { chanceNodes . remove ( nodeId ) ; } else if ( node instanceof UtilityNode ) { utilityNodes . remove ( nodeId ) ; } else if ( node instanceof ActionNode ) { actionNodes . remove ( nodeId ) ; } } return nodes . remove ( nodeId ) ; }
removes a node from the network , given its identifier
