Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.util.HashMap.js
1 Ext.data.JsonP.Ext_util_HashMap({
2   "tagname": "class",
3   "name": "Ext.util.HashMap",
4   "doc": "<p>\nRepresents a collection of a set of key and value pairs. Each key in the HashMap\nmust be unique, the same key cannot exist twice. Access to items is provided via\nthe key only. Sample usage:\n<pre><code>var map = new Ext.util.HashMap();\nmap.add('key1', 1);\nmap.add('key2', 2);\nmap.add('key3', 3);\n\nmap.each(function(key, value, length){\n    console.log(key, value, length);\n});\n</code></pre>\n</p>\n\n\n\n\n<p>The HashMap is an unordered class,\nthere is no guarantee when iterating over the items that they will be in any particular\norder. If this is required, then use a <a href=\"#/api/Ext.util.MixedCollection\" rel=\"Ext.util.MixedCollection\" class=\"docClass\">Ext.util.MixedCollection</a>.\n</p>\n\n",
5   "extends": null,
6   "mixins": [
7
8   ],
9   "alternateClassNames": [
10
11   ],
12   "xtype": null,
13   "author": null,
14   "docauthor": null,
15   "singleton": false,
16   "private": false,
17   "cfg": [
18     {
19       "tagname": "cfg",
20       "name": "keyFn",
21       "member": "Ext.util.HashMap",
22       "type": "Function",
23       "doc": "<p>A function that is used to retrieve a default key for a passed object.\nA default is provided that returns the <b>id</b> property on the object. This function is only used\nif the add method is called with a single argument.</p>\n",
24       "private": false,
25       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
26       "linenr": 28,
27       "html_filename": "HashMap.html",
28       "href": "HashMap.html#Ext-util-HashMap-cfg-keyFn",
29       "shortDoc": "A function that is used to retrieve a default key for a passed object.\nA default is provided that returns the id prop..."
30     }
31   ],
32   "method": [
33     {
34       "tagname": "method",
35       "name": "HashMap",
36       "member": "Ext.util.HashMap",
37       "doc": "\n",
38       "params": [
39         {
40           "type": "Object",
41           "name": "config",
42           "doc": "<p>The configuration options</p>\n",
43           "optional": false
44         }
45       ],
46       "return": {
47         "type": "void",
48         "doc": "\n"
49       },
50       "private": false,
51       "static": false,
52       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
53       "linenr": 1,
54       "html_filename": "HashMap.html",
55       "href": "HashMap.html#Ext-util-HashMap-method-constructor",
56       "shortDoc": "\n"
57     },
58     {
59       "tagname": "method",
60       "name": "add",
61       "member": "Ext.util.HashMap",
62       "doc": "<p>Adds an item to the collection. Fires the <a href=\"#/api/Ext.util.HashMap-event-add\" rel=\"Ext.util.HashMap-event-add\" class=\"docClass\">add</a> event when complete.</p>\n",
63       "params": [
64         {
65           "type": "String",
66           "name": "key",
67           "doc": "<p>The key to associate with the item, or the new item.</p>\n\n\n<p>If a <a href=\"#/api/Ext.util.HashMap--getKey\" rel=\"Ext.util.HashMap--getKey\" class=\"docClass\">getKey</a> implementation was specified for this HashMap,\nor if the key of the stored items is in a property called <tt><b>id</b></tt>,\nthe HashMap will be able to <i>derive</i> the key for the new item.\nIn this case just pass the new item in this parameter.</p>\n\n",
68           "optional": false
69         },
70         {
71           "type": "Object",
72           "name": "o",
73           "doc": "<p>The item to add.</p>\n",
74           "optional": false
75         }
76       ],
77       "return": {
78         "type": "Object",
79         "doc": "<p>The item added.</p>\n"
80       },
81       "private": false,
82       "static": false,
83       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
84       "linenr": 115,
85       "html_filename": "HashMap.html",
86       "href": "HashMap.html#Ext-util-HashMap-method-add",
87       "shortDoc": "<p>Adds an item to the collection. Fires the <a href=\"#/api/Ext.util.HashMap-event-add\" rel=\"Ext.util.HashMap-event-add\" class=\"docClass\">add</a> event when complete.</p>\n"
88     },
89     {
90       "tagname": "method",
91       "name": "clear",
92       "member": "Ext.util.HashMap",
93       "doc": "<p>Removes all items from the hash.</p>\n",
94       "params": [
95         {
96           "type": "Object",
97           "name": "initial",
98           "doc": "\n",
99           "optional": false
100         }
101       ],
102       "return": {
103         "type": "Ext.util.HashMap",
104         "doc": "<p>this</p>\n"
105       },
106       "private": false,
107       "static": false,
108       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
109       "linenr": 209,
110       "html_filename": "HashMap.html",
111       "href": "HashMap.html#Ext-util-HashMap-method-clear",
112       "shortDoc": "<p>Removes all items from the hash.</p>\n"
113     },
114     {
115       "tagname": "method",
116       "name": "clone",
117       "member": "Ext.util.HashMap",
118       "doc": "<p>Performs a shallow copy on this hash.</p>\n",
119       "params": [
120
121       ],
122       "return": {
123         "type": "Ext.util.HashMap",
124         "doc": "<p>The new hash object.</p>\n"
125       },
126       "private": false,
127       "static": false,
128       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
129       "linenr": 306,
130       "html_filename": "HashMap.html",
131       "href": "HashMap.html#Ext-util-HashMap-method-clone",
132       "shortDoc": "<p>Performs a shallow copy on this hash.</p>\n"
133     },
134     {
135       "tagname": "method",
136       "name": "contains",
137       "member": "Ext.util.HashMap",
138       "doc": "<p>Checks whether a value exists in the hash.</p>\n",
139       "params": [
140         {
141           "type": "Object",
142           "name": "value",
143           "doc": "<p>The value to check for.</p>\n",
144           "optional": false
145         }
146       ],
147       "return": {
148         "type": "Boolean",
149         "doc": "<p>True if the value exists in the dictionary.</p>\n"
150       },
151       "private": false,
152       "static": false,
153       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
154       "linenr": 232,
155       "html_filename": "HashMap.html",
156       "href": "HashMap.html#Ext-util-HashMap-method-contains",
157       "shortDoc": "<p>Checks whether a value exists in the hash.</p>\n"
158     },
159     {
160       "tagname": "method",
161       "name": "containsKey",
162       "member": "Ext.util.HashMap",
163       "doc": "<p>Checks whether a key exists in the hash.</p>\n",
164       "params": [
165         {
166           "type": "String",
167           "name": "key",
168           "doc": "<p>The key to check for.</p>\n",
169           "optional": false
170         }
171       ],
172       "return": {
173         "type": "Boolean",
174         "doc": "<p>True if they key exists in the hash.</p>\n"
175       },
176       "private": false,
177       "static": false,
178       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
179       "linenr": 223,
180       "html_filename": "HashMap.html",
181       "href": "HashMap.html#Ext-util-HashMap-method-containsKey",
182       "shortDoc": "<p>Checks whether a key exists in the hash.</p>\n"
183     },
184     {
185       "tagname": "method",
186       "name": "each",
187       "member": "Ext.util.HashMap",
188       "doc": "<p>Executes the specified function once for each item in the hash.\nReturning false from the function will cease iteration.</p>\n\n<p>The paramaters passed to the function are:</p>\n\n<div class=\"mdetail-params\"><ul>\n<li><b>key</b> : String<p class=\"sub-desc\">The key of the item</p></li>\n<li><b>value</b> : Number<p class=\"sub-desc\">The value of the item</p></li>\n<li><b>length</b> : Number<p class=\"sub-desc\">The total number of items in the hash</p></li>\n</ul></div>\n\n",
189       "params": [
190         {
191           "type": "Function",
192           "name": "fn",
193           "doc": "<p>The function to execute.</p>\n",
194           "optional": false
195         },
196         {
197           "type": "Object",
198           "name": "scope",
199           "doc": "<p>The scope to execute in. Defaults to <tt>this</tt>.</p>\n",
200           "optional": false
201         }
202       ],
203       "return": {
204         "type": "Ext.util.HashMap",
205         "doc": "<p>this</p>\n"
206       },
207       "private": false,
208       "static": false,
209       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
210       "linenr": 275,
211       "html_filename": "HashMap.html",
212       "href": "HashMap.html#Ext-util-HashMap-method-each",
213       "shortDoc": "Executes the specified function once for each item in the hash.\nReturning false from the function will cease iteratio..."
214     },
215     {
216       "tagname": "method",
217       "name": "get",
218       "member": "Ext.util.HashMap",
219       "doc": "<p>Retrieves an item with a particular key.</p>\n",
220       "params": [
221         {
222           "type": "String",
223           "name": "key",
224           "doc": "<p>The key to lookup.</p>\n",
225           "optional": false
226         }
227       ],
228       "return": {
229         "type": "Object",
230         "doc": "<p>The value at that key. If it doesn't exist, <tt>undefined</tt> is returned.</p>\n"
231       },
232       "private": false,
233       "static": false,
234       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
235       "linenr": 200,
236       "html_filename": "HashMap.html",
237       "href": "HashMap.html#Ext-util-HashMap-method-get",
238       "shortDoc": "<p>Retrieves an item with a particular key.</p>\n"
239     },
240     {
241       "tagname": "method",
242       "name": "getCount",
243       "member": "Ext.util.HashMap",
244       "doc": "<p>Gets the number of items in the hash.</p>\n",
245       "params": [
246
247       ],
248       "return": {
249         "type": "Number",
250         "doc": "<p>The number of items in the hash.</p>\n"
251       },
252       "private": false,
253       "static": false,
254       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
255       "linenr": 79,
256       "html_filename": "HashMap.html",
257       "href": "HashMap.html#Ext-util-HashMap-method-getCount",
258       "shortDoc": "<p>Gets the number of items in the hash.</p>\n"
259     },
260     {
261       "tagname": "method",
262       "name": "getKeys",
263       "member": "Ext.util.HashMap",
264       "doc": "<p>Return all of the keys in the hash.</p>\n",
265       "params": [
266
267       ],
268       "return": {
269         "type": "Array",
270         "doc": "<p>An array of keys.</p>\n"
271       },
272       "private": false,
273       "static": false,
274       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
275       "linenr": 241,
276       "html_filename": "HashMap.html",
277       "href": "HashMap.html#Ext-util-HashMap-method-getKeys",
278       "shortDoc": "<p>Return all of the keys in the hash.</p>\n"
279     },
280     {
281       "tagname": "method",
282       "name": "getValues",
283       "member": "Ext.util.HashMap",
284       "doc": "<p>Return all of the values in the hash.</p>\n",
285       "params": [
286
287       ],
288       "return": {
289         "type": "Array",
290         "doc": "<p>An array of values.</p>\n"
291       },
292       "private": false,
293       "static": false,
294       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
295       "linenr": 249,
296       "html_filename": "HashMap.html",
297       "href": "HashMap.html#Ext-util-HashMap-method-getValues",
298       "shortDoc": "<p>Return all of the values in the hash.</p>\n"
299     },
300     {
301       "tagname": "method",
302       "name": "remove",
303       "member": "Ext.util.HashMap",
304       "doc": "<p>Remove an item from the hash.</p>\n",
305       "params": [
306         {
307           "type": "Object",
308           "name": "o",
309           "doc": "<p>The value of the item to remove.</p>\n",
310           "optional": false
311         }
312       ],
313       "return": {
314         "type": "Boolean",
315         "doc": "<p>True if the item was successfully removed.</p>\n"
316       },
317       "private": false,
318       "static": false,
319       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
320       "linenr": 168,
321       "html_filename": "HashMap.html",
322       "href": "HashMap.html#Ext-util-HashMap-method-remove",
323       "shortDoc": "<p>Remove an item from the hash.</p>\n"
324     },
325     {
326       "tagname": "method",
327       "name": "removeAtKey",
328       "member": "Ext.util.HashMap",
329       "doc": "<p>Remove an item from the hash.</p>\n",
330       "params": [
331         {
332           "type": "String",
333           "name": "key",
334           "doc": "<p>The key to remove.</p>\n",
335           "optional": false
336         }
337       ],
338       "return": {
339         "type": "Boolean",
340         "doc": "<p>True if the item was successfully removed.</p>\n"
341       },
342       "private": false,
343       "static": false,
344       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
345       "linenr": 181,
346       "html_filename": "HashMap.html",
347       "href": "HashMap.html#Ext-util-HashMap-method-removeAtKey",
348       "shortDoc": "<p>Remove an item from the hash.</p>\n"
349     },
350     {
351       "tagname": "method",
352       "name": "replace",
353       "member": "Ext.util.HashMap",
354       "doc": "<p>Replaces an item in the hash. If the key doesn't exist, the\n<a href=\"#/api/Ext.util.HashMap-event-add\" rel=\"Ext.util.HashMap-event-add\" class=\"docClass\">add</a> method will be used.</p>\n",
355       "params": [
356         {
357           "type": "String",
358           "name": "key",
359           "doc": "<p>The key of the item.</p>\n",
360           "optional": false
361         },
362         {
363           "type": "Object",
364           "name": "value",
365           "doc": "<p>The new value for the item.</p>\n",
366           "optional": false
367         }
368       ],
369       "return": {
370         "type": "Object",
371         "doc": "<p>The new value of the item.</p>\n"
372       },
373       "private": false,
374       "static": false,
375       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
376       "linenr": 147,
377       "html_filename": "HashMap.html",
378       "href": "HashMap.html#Ext-util-HashMap-method-replace",
379       "shortDoc": "<p>Replaces an item in the hash. If the key doesn't exist, the\n<a href=\"#/api/Ext.util.HashMap-event-add\" rel=\"Ext.util.HashMap-event-add\" class=\"docClass\">add</a> method will be used.</p>\n"
380     }
381   ],
382   "property": [
383
384   ],
385   "event": [
386     {
387       "tagname": "event",
388       "name": "add",
389       "member": "Ext.util.HashMap",
390       "doc": "<p>Fires when a new item is added to the hash</p>\n",
391       "params": [
392         {
393           "type": "Ext.util.HashMap",
394           "name": "this",
395           "doc": "<p>.</p>\n",
396           "optional": false
397         },
398         {
399           "type": "String",
400           "name": "key",
401           "doc": "<p>The key of the added item.</p>\n",
402           "optional": false
403         },
404         {
405           "type": "Object",
406           "name": "value",
407           "doc": "<p>The value of the added item.</p>\n",
408           "optional": false
409         }
410       ],
411       "private": false,
412       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
413       "linenr": 42,
414       "html_filename": "HashMap.html",
415       "href": "HashMap.html#Ext-util-HashMap-event-add",
416       "shortDoc": "<p>Fires when a new item is added to the hash</p>\n"
417     },
418     {
419       "tagname": "event",
420       "name": "clear",
421       "member": "Ext.util.HashMap",
422       "doc": "<p>Fires when the hash is cleared.</p>\n",
423       "params": [
424         {
425           "type": "Ext.util.HashMap",
426           "name": "this",
427           "doc": "<p>.</p>\n",
428           "optional": false
429         }
430       ],
431       "private": false,
432       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
433       "linenr": 50,
434       "html_filename": "HashMap.html",
435       "href": "HashMap.html#Ext-util-HashMap-event-clear",
436       "shortDoc": "<p>Fires when the hash is cleared.</p>\n"
437     },
438     {
439       "tagname": "event",
440       "name": "remove",
441       "member": "Ext.util.HashMap",
442       "doc": "<p>Fires when an item is removed from the hash.</p>\n",
443       "params": [
444         {
445           "type": "Ext.util.HashMap",
446           "name": "this",
447           "doc": "<p>.</p>\n",
448           "optional": false
449         },
450         {
451           "type": "String",
452           "name": "key",
453           "doc": "<p>The key of the removed item.</p>\n",
454           "optional": false
455         },
456         {
457           "type": "Object",
458           "name": "value",
459           "doc": "<p>The value of the removed item.</p>\n",
460           "optional": false
461         }
462       ],
463       "private": false,
464       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
465       "linenr": 56,
466       "html_filename": "HashMap.html",
467       "href": "HashMap.html#Ext-util-HashMap-event-remove",
468       "shortDoc": "<p>Fires when an item is removed from the hash.</p>\n"
469     },
470     {
471       "tagname": "event",
472       "name": "replace",
473       "member": "Ext.util.HashMap",
474       "doc": "<p>Fires when an item is replaced in the hash.</p>\n",
475       "params": [
476         {
477           "type": "Ext.util.HashMap",
478           "name": "this",
479           "doc": "<p>.</p>\n",
480           "optional": false
481         },
482         {
483           "type": "String",
484           "name": "key",
485           "doc": "<p>The key of the replaced item.</p>\n",
486           "optional": false
487         },
488         {
489           "type": "Object",
490           "name": "value",
491           "doc": "<p>The new value for the item.</p>\n",
492           "optional": false
493         },
494         {
495           "type": "Object",
496           "name": "old",
497           "doc": "<p>The old value for the item.</p>\n",
498           "optional": false
499         }
500       ],
501       "private": false,
502       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
503       "linenr": 64,
504       "html_filename": "HashMap.html",
505       "href": "HashMap.html#Ext-util-HashMap-event-replace",
506       "shortDoc": "<p>Fires when an item is replaced in the hash.</p>\n"
507     }
508   ],
509   "filename": "/Users/nick/Projects/sencha/SDK/platform/src/util/HashMap.js",
510   "linenr": 1,
511   "html_filename": "HashMap.html",
512   "href": "HashMap.html#Ext-util-HashMap",
513   "cssVar": [
514
515   ],
516   "cssMixin": [
517
518   ],
519   "component": false,
520   "superclasses": [
521
522   ],
523   "subclasses": [
524
525   ],
526   "mixedInto": [
527
528   ],
529   "allMixins": [
530
531   ]
532 });