I have two data structures in Java:
One is called DebateAssignment and has 5 DebateTeam objects, each associated with a specific enum that includes
{JUDGE, PROP1, PROP2, OP1, OP2}
In another class I use List<DebateAssignment> and I want to create an iterator that will point to a specific DebateTeam in a specific DebateAssignment and I want it to iterate over all teams over all assignments, going from an assignment to assignment seamlessly.
How would I go about doing that?
Assuming
DebateAssignmenthas something likeYou want an
Iterator<DebateTeam>?If so, would you want something like: