ArrayFilter
Used to filter an array to items for which the closure function returns true.
Method Signature
Arguments
Argument | Type | Required | Description | Default |
---|---|---|---|---|
|
|
| The array to reduce | |
|
|
| The function to invoke for each item. The function will be passed 3 arguments: the value, the index, the array. You can alternatively pass a Java Predicate which will only receive the 1st arg. | |
|
|
| Specifies whether the items can be executed in parallel |
|
|
|
| The maximum number of threads to use when parallel = true | |
|
|
|
Examples
Related
Last updated