public IntPair next() {
   int x = i++;
   return new IntPair(x, mapping.getTarget(x));
 }