History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GROOVY-2428
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Paul King
Reporter: Mike Dillon
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

Provide a reverseEach method for arrays

Created: 20/Dec/07 10:36 PM   Updated: 23/Dec/07 03:01 PM
Component/s: groovy-jdk
Affects Version/s: None
Fix Version/s: 1.5.2

Time Tracking:
Not Specified

File Attachments: 1. File reverseEach.diff (3 kb)


Testcase included: yes
Patch Submitted: Yes


 Description  « Hide
Since arrays have well defined ordering, it would be nice if they had a reverseEach method like List does.

I'm providing a patch to add this behavior. In addition, it changes the implementation of List.reverseEach to use the ListIterator to iterate in reverse instead of copying the list first, which is helpful for iterating large lists in reverse efficiently.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Paul King - 23/Dec/07 03:01 PM
Added. Thanks for the patch.