Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.5.6, 1.6-beta-1
-
None
-
None
Description
Currently, the find() method return the first matched result, findAll() returns all matched result. It's suggested to have an interface that take a "limit" parameter to limit the maximum number of return records.
- find() (or findAll()) to take a "limit" integer to decide how many records shall be returned.
e.g. [1,2,3,4].findAll(2) {it>1}== [2,3]
- Groovy 1.x doesn't support "break" in the closure.
Also refer to the discussion at:
http://www.nabble.com/Groovy-syntax--API-enhancement-td16796998.html#a16810531