Make classes support "iterator pattern".