The error message is telling you exactly what's wrong. Namely, An Iterator is not a CurriculumSubject, and hence cannot be treated like one. An Iterator's next() method, however, can return a CurriculumSubject.
Note that "l" is a horrible variable name.
Also note that you could do away with the cast
ant the explicit iterator by using Generics and the Foreach loop: