classDiagram class IEntityIterator~T~ { <> +HasNext() bool +Next() T* +Reset() } class EntityIterator~T~ { -List~T~ _entities -int _currentIndex +HasNext() bool +Next() T* +Reset() } class Simulator~T~ { <> -List~T~ _entities +CreateIterator() IEntityIterator~T~ } class Dish { } IEntityIterator~T~ <|.. EntityIterator~T~ Simulator~T~ --> IEntityIterator~T~ : creates Simulator~T~ <|-- Dish EntityIterator~T~ *-- List~T~ : iterates over note for Simulator~T~ "Provides iterator for entity collections" note for EntityIterator~T~ "Iterates over entities in the simulator"