# Yahoo! UI Library

### collection 3.1.1

Yahoo! UI Library > collection > ArrayList~filter
Search:
Filters Show Private Show Protected Show Deprecated

## Class ArrayList~filter

Adds filter method to ArrayList prototype

### Methods

#### 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

Copyright © 2010 Yahoo! Inc. All rights reserved.