Pattern: Iterator, java flavour