-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-util.MixedCollection-method-constructor'><span id='Ext-util.MixedCollection'>/**
-</span></span> * @class Ext.util.MixedCollection
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <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>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-util-MixedCollection'>/**
+</span> * @class Ext.util.MixedCollection
* <p>
* Represents a collection of a set of key and value pairs. Each key in the MixedCollection
* must be unique, the same key cannot exist twice. This collection is ordered, items in the
console.log(biggerThanZero.getCount()); // prints 2
* </code></pre>
* </p>
- *
- * @constructor
- * @param {Boolean} allowFunctions Specify <tt>true</tt> if the {@link #addAll}
- * function should add function references to the collection. Defaults to
- * <tt>false</tt>.
- * @param {Function} keyFn A function that can accept an item of the type(s) stored in this MixedCollection
- * and return the key value for that item. This is used when available to look up the key on items that
- * were passed without an explicit key parameter to a MixedCollection method. Passing this parameter is
- * equivalent to providing an implementation for the {@link #getKey} method.
*/
Ext.define('Ext.util.MixedCollection', {
extend: 'Ext.util.AbstractMixedCollection',
sortable: 'Ext.util.Sortable'
},
+<span id='Ext-util-MixedCollection-method-constructor'> /**
+</span> * Creates new MixedCollection.
+ * @param {Boolean} allowFunctions Specify <tt>true</tt> if the {@link #addAll}
+ * function should add function references to the collection. Defaults to
+ * <tt>false</tt>.
+ * @param {Function} keyFn A function that can accept an item of the type(s) stored in this MixedCollection
+ * and return the key value for that item. This is used when available to look up the key on items that
+ * were passed without an explicit key parameter to a MixedCollection method. Passing this parameter is
+ * equivalent to providing an implementation for the {@link #getKey} method.
+ */
constructor: function() {
var me = this;
me.callParent(arguments);
this.sortBy(sorterFn);
},
-<span id='Ext-util.MixedCollection-method-_sort'> /**
+<span id='Ext-util-MixedCollection-method-_sort'> /**
</span> * @private
* Performs the actual sorting based on a direction and a sorting function. Internally,
* this creates a temporary array of all items in the MixedCollection, sorts it and then writes
me.fireEvent('sort', me);
},
-<span id='Ext-util.MixedCollection-method-sortBy'> /**
+<span id='Ext-util-MixedCollection-method-sortBy'> /**
</span> * Sorts the collection by a single sorter function
* @param {Function} sorterFn The function to sort by
*/
me.fireEvent('sort', me, items, keys);
},
-<span id='Ext-util.MixedCollection-method-reorder'> /**
+<span id='Ext-util-MixedCollection-method-reorder'> /**
</span> * Reorders each of the items based on a mapping from old index to new index. Internally this
* just translates into a sort. The 'sort' event is fired whenever reordering has occured.
* @param {Object} mapping Mapping from old item index to new item index
me.fireEvent('sort', me);
},
-<span id='Ext-util.MixedCollection-method-sortByKey'> /**
+<span id='Ext-util-MixedCollection-method-sortByKey'> /**
</span> * Sorts this collection by <b>key</b>s.
* @param {String} direction (optional) 'ASC' or 'DESC'. Defaults to 'ASC'.
* @param {Function} fn (optional) Comparison function that defines the sort order.
});
}
});
-</pre></pre></body></html>
\ No newline at end of file
+</pre>
+</body>
+</html>