src/trackinfrastructure/trackelements/Route.java
public void addTracksideElement(TracksideElement element, double distance) {
		if(tracksideElements == null) {
			tracksideElements = new ArrayList<Pair<TracksideElement, Double>>();
		}
		
		int index = 0;
		while ( index < tracksideElements.size() && distance > tracksideElements.get( index ).getRight() ) {
			index++;
		}
		tracksideElements.add( index, new Pair<TracksideElement, Double>( element, distance ) );
	}
/**
	 * Add  a tracksideElement to this route
	 * @param element
	 * @param distance distance from the start of the route
	 */
Add  a tracksideElement to this route
@param element
@param distance distance from the start of the route
Add a tracksideElement to this route @param element @param distance distance from the start of the route
public void addTracksideElement(TracksideElement element, double distance) {
		if(tracksideElements == null) {
			tracksideElements = new ArrayList<Pair<TracksideElement, Double>>();
		}
		int index = 0;
		while ( index < tracksideElements.size() && distance > tracksideElements.get( index ).getRight() ) {
			index++;
		}
		tracksideElements.add( index, new Pair<TracksideElement, Double>( element, distance ) );
	}
public void addTracksideElement ( TracksideElement element , double distance ) { if ( tracksideElements == null ) { tracksideElements = new ArrayList < Pair < TracksideElement , Double > > ( ) ; } int index = 0 ; while ( index < tracksideElements . size ( ) && distance > tracksideElements . get ( index ) . getRight ( ) ) { index ++ ; } tracksideElements . add ( index , new Pair < TracksideElement , Double > ( element , distance ) ) ; }
Add  a tracksideElement to this route
 @param element
 @param distance distance from the start of the route
Add a tracksideElement to this route @param element @param distance distance from the start of the route