
| Key: |
GROOVY-2839
|
| Type: |
New Feature
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Mingfai Ma
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
groovy
Created: 19/May/08 06:27 AM
Updated: 19/May/08 06:27 AM
|
|
| Component/s: |
syntax
|
| Affects Version/s: |
1.6-beta-1,
1.5.6
|
| Fix Version/s: |
None
|
|
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
|
|
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 |
Show » |
| There are no comments yet on this issue.
|
|