Currently (as of Java 6), using Java's enhanced for-loop I do not know of any way to directly access the iterator index short of reverting to the old indexed for-loop or using an outside counter.
Are there plans (or perhaps a current way) to implement this "enhanced enhanced" for-loop where one would be able to access the index of the loop (and even possibly manipulate it)?
As an example where this might be needed, consider(this is from actual production code):
int i = 1;
for (final String action : actions) {
parameters.set(String.valueOf(i++), action);
}