public static NetworkConfig unmergeNetworks ( NetworkConfig base , NetworkConfig unmerge ) { if ( ! base . getName ( ) . equals ( unmerge . getName ( ) ) ) { throw new IllegalArgumentException ( "Cannot merge networks of different names." ) ; } for ( ComponentConfig < ? > component : unmerge . getComponents ( ) ) { base . removeComponent ( component . getName ( ) ) ; } for ( ConnectionConfig connection : unmerge . getConnections ( ) ) { base . destroyConnection ( connection ) ; } return base ; }
Unmerges one network configuration from another .