goog.structs
Functions
clear( col ) → void
void
Removes all the elements from the collection.
Parameters |
|
---|
contains( col, val ) → boolean
boolean
every<T, S>( col, f, opt_obj ) → boolean
boolean
Calls f for each value in a collection. If all calls return true this return true this returns true. If any returns false this returns false at this point and does not continue to check the remaining values.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
filter<T, S>( col, f, opt_obj ) → Object
Object
Calls a function for every value in the collection. When a call returns true, adds the value to a new collection (Array is returned by default).
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
forEach<T, S>( col, f, opt_obj ) → void
void
Calls a function for each value in a collection. The function takes three arguments; the value, the key and the collection.
warning Deprecated | Use a more specific method, e.g. native Array.prototype.forEach, or for-of. |
---|
Parameters |
|
---|
getCount( col ) → number
number
getKeys( col ) → (Array|undefined)
(Array|undefined)
getValues( col ) → Array<?>
Array<?>
isEmpty( col ) → boolean
boolean
Calls a function for every value in the collection and adds the result into a new collection (defaults to creating a new Array).
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
some<T, S>( col, f, opt_obj ) → boolean
boolean
Calls f for each value in a collection. If any call returns true this returns true (without checking the rest). If all returns false this returns false.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|