public boolean removeBusHub ( String name ) { Iterator < BusHub > iterator ; BusHub busHub ; iterator = this . validBusHubs . iterator ( ) ; while ( iterator . hasNext ( ) ) { busHub = iterator . next ( ) ; if ( name . equals ( busHub . getName ( ) ) ) { iterator . remove ( ) ; busHub . setContainer ( null ) ; busHub . setEventFirable ( true ) ; firePrimitiveChanged ( new BusChangeEvent ( this , BusChangeEventType . HUB_REMOVED , busHub , - 1 , null , null , null ) ) ; checkPrimitiveValidity ( ) ; return true ; } } iterator = this . invalidBusHubs . iterator ( ) ; while ( iterator . hasNext ( ) ) { busHub = iterator . next ( ) ; if ( name . equals ( busHub . getName ( ) ) ) { iterator . remove ( ) ; busHub . setContainer ( null ) ; firePrimitiveChanged ( new BusChangeEvent ( this , BusChangeEventType . HUB_REMOVED , busHub , - 1 , null , null , null ) ) ; checkPrimitiveValidity ( ) ; return true ; } } return false ; }
Remove the bus hub with the given name .