interface IndexIterator { // return next index or -1 if finished public int nextIndex(); }