@Override
	public synchronized void removeFromFloor(ElevatorInterface elevatorToEnter, Direction directionToGo) 
	{
		if(directionToGo != Direction.IDLE)
		{
			ArrayList<Person> peopleToRemove;
			if(directionToGo == Direction.UP)
			{
				peopleToRemove = this.goingUp;
			}
			else
			{
				peopleToRemove = this.goingDown;
			}
			int i;
			boolean bRemovalSuccessful = true;
			for(i = 0; i < peopleToRemove.size() && bRemovalSuccessful; ++i)
			{
				Person curPerson = peopleToRemove.get(i);
				try
				{
					bRemovalSuccessful = elevatorToEnter.addPassenger(curPerson);
				}
				catch (NullPassengerException | NegativeFloorException e)
				{
					e.printStackTrace();
				}
			}
			int removalIndex;
			if(!bRemovalSuccessful)
			{
				removalIndex = i;
			}
			else
			{
				removalIndex = peopleToRemove.size();
			}
			for(int j = 0; j < removalIndex; ++j)
			{
				try
				{
					peopleToRemove.remove(0);

				}
				catch(IndexOutOfBoundsException e)
				{
					e.printStackTrace();
				}
			}
		}
	}