public void replaceNode(BNode node){
  if (!nodes.containsKey(node.getId())) {
    log.fine("network does not contain a node with identifier " + node.getId());
  }
 else {
    removeNode(node.getId());
  }
  addNode(node);
}

public void replaceNode ( BNode node ) { if ( ! nodes . containsKey ( node . getId ( ) ) ) { log . fine ( "network does not contain a node with identifier " + node . getId ( ) ) ; } else { removeNode ( node . getId ( ) ) ; } addNode ( node ) ; }
replaces an existing node with a new one ( with same identifier )
