Module Ext_util_MixedCollection


module Ext_util_MixedCollection: sig .. end
Represents a collection of a set of key and value ...

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 collection can be accessed by index or via the key. Newly added items are added to the end of the collection. This class is similar to Ext.util.HashMap however it is heavier and provides more functionality. Sample usage:

var coll = new Ext.util.MixedCollection();
coll.add('key1', 'val1');
coll.add('key2', 'val2');
coll.add('key3', 'val3');

console.log(coll.get('key1')); // prints 'val1'
console.log(coll.indexOfKey('key3')); // prints 2

The MixedCollection also has support for sorting and filtering of the values in the collection.

var coll = new Ext.util.MixedCollection();
coll.add('key1', 100);
coll.add('key2', -100);
coll.add('key3', 17);
coll.add('key4', 0);
var biggerThanZero = coll.filterBy(function(value){
    return value > 0;
});
console.log(biggerThanZero.getCount()); // prints 2


class type t = object .. end
class type configs = object .. end
class type events = object .. end
class type statics = object .. end
val of_configs : configs Js.t -> t Js.t
of_configs c casts a config object c to an instance of class t
val to_configs : t Js.t -> configs Js.t
to_configs o casts instance o of class t to a config object