Guidewire Interview Question

Design custom Iterator with hasNext() and Next() for a specific custom class