Completed generic class hwk, also changed isAfterNext so set doesn't always throw exception.