git.ithinksw.org
/
extjs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git]
/
docs
/
source
/
HashMap.html
diff --git
a/docs/source/HashMap.html
b/docs/source/HashMap.html
index
7304406
..
6546b67
100644
(file)
--- a/
docs/source/HashMap.html
+++ b/
docs/source/HashMap.html
@@
-3,8
+3,8
@@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
- <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../prettify/prettify.js"></script>
+ <link href="../
resources/
prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../
resources/
prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
@@
-15,8
+15,8
@@
</script>
</head>
<body onload="prettyPrint(); highlight();">
</script>
</head>
<body onload="prettyPrint(); highlight();">
- <pre class="prettyprint lang-js"><span id='Ext-util-HashMap
-method-constructor'><span id='Ext-util-HashMap
'>/**
-</span>
</span>
* @class Ext.util.HashMap
+ <pre class="prettyprint lang-js"><span id='Ext-util-HashMap'>/**
+</span> * @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
* <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,10
+37,11
@@
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>
* 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', {
*/
Ext.define('Ext.util.HashMap', {
+ mixins: {
+ observable: 'Ext.util.Observable'
+ },
<span id='Ext-util-HashMap-cfg-keyFn'> /**
</span> * @cfg {Function} keyFn A function that is used to retrieve a default key for a passed object.
<span id='Ext-util-HashMap-cfg-keyFn'> /**
</span> * @cfg {Function} keyFn A function that is used to retrieve a default key for a passed object.
@@
-48,12
+49,15
@@
Ext.define('Ext.util.HashMap', {
* if the add method is called with a single argument.
*/
* if the add method is called with a single argument.
*/
- mixins: {
- observable: 'Ext.util.Observable'
- },
-
+<span id='Ext-util-HashMap-method-constructor'> /**
+</span> * Creates new HashMap.
+ * @param {Object} config (optional) Config object.
+ */
constructor: function(config) {
constructor: function(config) {
- var me = this;
+ config = config || {};
+
+ var me = this,
+ keyFn = config.keyFn;
me.addEvents(
<span id='Ext-util-HashMap-event-add'> /**
me.addEvents(
<span id='Ext-util-HashMap-event-add'> /**
@@
-91,6
+95,10
@@
Ext.define('Ext.util.HashMap', {
me.mixins.observable.constructor.call(me, config);
me.clear(true);
me.mixins.observable.constructor.call(me, config);
me.clear(true);
+
+ if (keyFn) {
+ me.getKey = keyFn;
+ }
},
<span id='Ext-util-HashMap-method-getCount'> /**
},
<span id='Ext-util-HashMap-method-getCount'> /**
@@
-121,7
+129,6
@@
Ext.define('Ext.util.HashMap', {
<span id='Ext-util-HashMap-method-getKey'> /**
</span> * Extracts the key from an object. This is a default implementation, it may be overridden
<span id='Ext-util-HashMap-method-getKey'> /**
</span> * 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.
*/
* @param {Object} o The object to get the key from
* @return {String} The key to use.
*/
@@
-149,7
+156,7
@@
Ext.define('Ext.util.HashMap', {
}
if (me.containsKey(key)) {
}
if (me.containsKey(key)) {
- me.replace(key, value);
+
return
me.replace(key, value);
}
data = me.getData(key, value);
}
data = me.getData(key, value);