Simulator/src/model/map/Map.java
/**
	 * Checks if there is an issue by adding a {@link MapComponent} to the map.
	 * Throw an exception if there is.
	 * 
	 * @param mapComponent
	 *            The mapComponent.
	 */
Checks if there is an issue by adding a  MapComponent to the map.
Throw an exception if there is.

@param mapComponent
The mapComponent.
Checks if there is an issue by adding a MapComponent to the map . Throw an exception if there is . @param mapComponent The mapComponent .
private void checkForAddIssues(MapComponent mapComponent) {
		if (mapComponent instanceof PhysicalObject) {
			Collection<Passenger> agents = getMapComponents(Passenger.class);
			if (!agents.isEmpty()) {
				throw new RuntimeException("You added a physical object to the map, after you added a passenger. "
						+ "Please add all physical objects before adding passengers to the map.");
			}
		} else if (mapComponent instanceof QueuingArea) {
			Collection<Flight> flights = getMapComponents(Flight.class);
			if (!flights.isEmpty()) {
				throw new RuntimeException("You added a queueing area to the map, after you added a flight. "
						+ "Please add all queueing area before adding flights to the map.");
			}
		}
	}
private void checkForAddIssues ( MapComponent mapComponent ) { if ( mapComponent instanceof PhysicalObject ) { Collection < Passenger > agents = getMapComponents ( Passenger . class ) ; if ( ! agents . isEmpty ( ) ) { throw new RuntimeException ( "You added a physical object to the map, after you added a passenger. " + "Please add all physical objects before adding passengers to the map." ) ; } } else if ( mapComponent instanceof QueuingArea ) { Collection < Flight > flights = getMapComponents ( Flight . class ) ; if ( ! flights . isEmpty ( ) ) { throw new RuntimeException ( "You added a queueing area to the map, after you added a flight. " + "Please add all queueing area before adding flights to the map." ) ; } } }
Checks if there is an issue by adding a {@link MapComponent} to the map.
Checks if there is an issue by adding a { @link MapComponent } to the map .