@ Pure public BusHub getBusHub ( String name , Comparator < String > nameComparator ) { if ( name == null ) { return null ; } final Comparator < String > cmp = nameComparator == null ? BusNetworkUtilities . NAME_COMPARATOR : nameComparator ; for ( final BusHub busHub : this . validBusHubs ) { if ( cmp . compare ( name , busHub . getName ( ) ) == 0 ) { return busHub ; } } for ( final BusHub busHub : this . invalidBusHubs ) { if ( cmp . compare ( name , busHub . getName ( ) ) == 0 ) { return busHub ; } } return null ; }
Replies the bus hub with the specified name .