groovy

Provide a reverseEach method for arrays

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.5.2
  • Component/s: groovy-jdk
  • Labels:
    None
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

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.

Activity

Hide
Paul King added a comment -

Added. Thanks for the patch.

Show
Paul King added a comment - Added. Thanks for the patch.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: