filter
ArrayList
filter
(
validator
)
Create a new ArrayList (or augmenting class instance) from a subset of items as determined by the boolean function passed as the argument. The original ArrayList is unchanged.
The validator signature is validator( item )
.
- Parameters:
-
validator < Function >
Boolean function to determine in or out.
- Returns:
ArrayList
- New instance based on who passed the validator.