question: public void addNode ( BNode node ) { if ( nodes . containsKey ( node . getId ( ) ) ) { log . warning ( "network already contains a node with identifier " + node . getId ( ) ) ; } nodes . put ( node . getId ( ) , node ) ; node . setNetwork ( this ) ; if ( node instanceof ChanceNode ) { chanceNodes . put ( node . getId ( ) , ( ChanceNode ) node ) ; } else if ( node instanceof UtilityNode ) { utilityNodes . put ( node . getId ( ) , ( UtilityNode ) node ) ; } else if ( node instanceof ActionNode ) { actionNodes . put ( node . getId ( ) , ( ActionNode ) node ) ; } }
target:  Adds a new node to the network. Note: if the node already exists, it is better to use the "replaceNode" method, to avoid warning messages.