
public final class Checker {
	
	public static Integer getFirstFreePosition(IPatient[] objectsList){
		Integer pos = null;
		for (int i = 0; i < objectsList.length; i++){
			if (objectsList[i] == null){
				pos = i;
				break;
			}
		}
		return pos;
	}
	
	public static Integer getFirstFreePosition(ADoctor[] objectsList){
		Integer pos = null;
		for (int i = 0; i < objectsList.length; i++){
			if (objectsList[i] == null){
				pos = i;
				break;
			}
		}
		return pos;
	}
}
