FromToCounter counterX = new FromToCounter(x1, x2);
FromToCounter counterY = new FromToCounter(y1, y2);
// Start processing the area
while (counterX.hasNext()) {
counterX.next();
counterY.reset();
while (counterY.hasNext()) {
counterY.next();
set(counterX.get(), counterY.get(), text, ping);
}
}