Yahoo! UI Library

collection  3.3.0pr1

Yahoo! UI Library > collection > ArrayList~filter
Search:
 
Filters

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.