public static String getFirstFreeBusLineName ( BusNetwork network ) { if ( network == null ) { return null ; } int nb = network . getBusLineCount ( ) ; String name ; do { ++ nb ; name = Locale . getString ( "NAME_TEMPLATE" , Integer . toString ( nb ) ) ; //$NON-NLS-1$ } while ( network . getBusLine ( name ) != null ) ; return name ; }
Replies a bus line name that was not exist in the specified network .