var m = new LinkedMap(); m.set('param1', 'A'); m.set('param2', 'B'); m.set('param3', 'C'); alert(m.getKeys()); // param1, param2, param3 var c = new LinkedMap(5, true); for (var i = 0; i < 10; i++) { c.set('entry' + i, false); } alert(c.getKeys()); // entry9, entry8, entry7, entry6, entry5 c.set('entry5', true); c.set('entry1', false); alert(c.getKeys()); // entry1, entry5, entry9, entry8, entry7
#getParent
and #getChildren
in a subclass. All other getters
will automatically work.
![]()
Removes all the elements from the collection.
Arguments:
|
code » | ||||
Whether the collection contains the given value. This is O(n) and uses
equals (==) to test the existence.
|
code » | ||||
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.
Arguments:
Returns: boolean
True if all key-value pairs pass the test.
|
code » | ||||
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).
Arguments:
|
code » | ||||
![]()
Calls a function for each value in a collection. The function takes
three arguments; the value, the key and the collection.
NOTE: This will be deprecated soon! Please use a more specific method if
possible, e.g. goog.array.forEach, goog.object.forEach, etc.
Arguments:
|
code » | ||||
Returns the number of values in the collection-like object.
|
code » | ||||
Returns the keys of the collection. Some collections have no notion of
keys/indexes and this function will return undefined in those cases.
|
code » | ||||
Returns the values of the collection-like object.
|
code » | ||||
Whether the collection is empty.
|
code » | ||||
Calls a function for every value in the collection and adds the result into a
new collection (defaults to creating a new Array).
Arguments:
|
code » | ||||
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.
Arguments:
Returns: boolean
True if any value passes the test.
|
code » |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
No description.
|
Code » |