public boolean hasNode(String nodeId){
  return nodes.containsKey(nodeId);
}

public boolean hasNode ( String nodeId ) { return nodes . containsKey ( nodeId ) ; }
returns true if the network contains a node with the given identifier
