Clear Up
SharpKit Reference

MixedCollection Class

Namespace: Ext.util

Base Types

System.Object

Constructors

Name Description
MixedCollection() Creates new MixedCollection. @param {Boolean} allowFunctions Specify true if the {@link #addAll} function should add function references to the collection. Defaults to false. @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.

Methods

Name Description
_sort(JsString, JsString, JsAction) @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 the sorted array data back into this.items and this.keys @param {String} property Property to sort by ('key', 'value', or 'index') @param {String} dir (optional) Direction to sort 'ASC' or 'DESC'. Defaults to 'ASC'. @param {Function} fn (optional) Comparison function that defines the sort order. Defaults to sorting by numeric value.
doSort(object)
reorder(object) 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
sortBy(JsAction) Sorts the collection by a single sorter function @param {Function} sorterFn The function to sort by
sortByKey(JsString, JsAction) Sorts this collection by keys. @param {String} direction (optional) 'ASC' or 'DESC'. Defaults to 'ASC'. @param {Function} fn (optional) Comparison function that defines the sort order. Defaults to sorting by case insensitive string.

Properties

Name Description
extend
© Copyright 2005-2011 SharpKit. All rights reserved.