Dmitri Blinov created JEXL-269: ---------------------------------- Summary: Indexed for-loop Key: JEXL-269 URL: https://issues.apache.org/jira/browse/JEXL-269 Project: Commons JEXL Issue Type: New Feature Affects Versions: 3.1 Environment: I have created a PR for this feature, please see [PR#12|https://github.com/apache/commons-jexl/pull/12] Reporter: Dmitri Blinov
Introduce new extended syntax of 'for' statement, which allows to specify two variables, like the following {code:java} for (var i, item : list){code} Inside the loop, the first variable gets current iteration index, starting from 0, and the second variable gets current iterated value. The special consideration is taken for iteration over map entries, like the following {code:java} for(var key, entry : map){code} , in this case the first variable is the map key, and the second is the corresponding map value -- This message was sent by Atlassian JIRA (v7.6.3#76005)