(Completed) iterators transformed to java style