X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/HashMap.html diff --git a/docs/source/HashMap.html b/docs/source/HashMap.html index 73044061..3285bfde 100644 --- a/docs/source/HashMap.html +++ b/docs/source/HashMap.html @@ -15,8 +15,8 @@
-/** - * @class Ext.util.HashMap +/** + * @class Ext.util.HashMap * <p> * Represents a collection of a set of key and value pairs. Each key in the HashMap * must be unique, the same key cannot exist twice. Access to items is provided via @@ -37,8 +37,6 @@ map.each(function(key, value, length){ * there is no guarantee when iterating over the items that they will be in any particular * order. If this is required, then use a {@link Ext.util.MixedCollection}. * </p> - * @constructor - * @param {Object} config The configuration options */ Ext.define('Ext.util.HashMap', { @@ -52,8 +50,15 @@ Ext.define('Ext.util.HashMap', { observable: 'Ext.util.Observable' }, + /** + * Creates new HashMap. + * @param {Object} config (optional) Config object. + */ constructor: function(config) { - var me = this; + config = config || {}; + + var me = this, + keyFn = config.keyFn; me.addEvents( /** @@ -91,6 +96,10 @@ Ext.define('Ext.util.HashMap', { me.mixins.observable.constructor.call(me, config); me.clear(true); + + if (keyFn) { + me.getKey = keyFn; + } }, /** @@ -121,7 +130,6 @@ Ext.define('Ext.util.HashMap', { /** * Extracts the key from an object. This is a default implementation, it may be overridden - * @private * @param {Object} o The object to get the key from * @return {String} The key to use. */