nowhere have you inserted floor 0 into upList,
anotherFloor = (Integer)upList.get(0);
firstElement = anotherFloor.intValue();
so anotherFloor will be null
and anotherFloor.intValue() will throw a null pointer exception
nothing strange here (except perhaps your expectation that it won't)