src/trackinfrastructure/trackelements/MultiRouteTrackElement.java
protected void addActiveRoute(Route route) {
		if( !possibleRoutes.contains( route ) )
			throw new RuntimeException("addActiveRoute: Route does not belong to possible routes!");
			
		for (int i = 0; i < activeRoutes.size(); i++) {
			if( activeRoutes.get(i).getStart() == route.getStart() ) {
				activeRoutes.set(i, route);
				return;
			}
		}
		
		activeRoutes.add( route );
	}
/*
	 * Add a possible Route to the active ones, if there is a route with the same origin it gets removed.
	 */
Add a possible Route to the active ones, if there is a route with the same origin it gets removed.
Add a possible Route to the active ones if there is a route with the same origin it gets removed .
protected void addActiveRoute(Route route) {
		if( !possibleRoutes.contains( route ) )
			throw new RuntimeException("addActiveRoute: Route does not belong to possible routes!");
		for (int i = 0; i < activeRoutes.size(); i++) {
			if( activeRoutes.get(i).getStart() == route.getStart() ) {
				activeRoutes.set(i, route);
				return;
			}
		}
		activeRoutes.add( route );
	}
protected void addActiveRoute ( Route route ) { if ( ! possibleRoutes . contains ( route ) ) throw new RuntimeException ( "addActiveRoute: Route does not belong to possible routes!" ) ; for ( int i = 0 ; i < activeRoutes . size ( ) ; i ++ ) { if ( activeRoutes . get ( i ) . getStart ( ) == route . getStart ( ) ) { activeRoutes . set ( i , route ) ; return ; } } activeRoutes . add ( route ) ; }
Add a possible Route to the active ones, if there is a route with the same origin it gets removed.
Add a possible Route to the active ones if there is a route with the same origin it gets removed .