Class type Ext_util_AbstractMixedCollection.t


class type t = object .. end
Inherits
method isMixedCollection : bool Js.t Js.prop

true in this class to identify an object as an instantiated MixedCollection, or subclass thereof.

Defaults to: true

method add : 'a 'b 'c. 'a Js.t -> 'b Js.t Js.optdef -> 'c Js.t Js.meth

Adds an item to the collection. Fires the add event when complete.

Parameters:

Returns:


method addAll : 'd. 'd Js.t -> unit Js.meth

Adds all elements of an Array or an Object to the collection.

Parameters:


method clear : unit Js.meth

Removes all items from the collection. Fires the clear event when complete.


method clone : (< add : 'a 'b 'c. 'a Js.t -> 'b Js.t Js.optdef -> 'c Js.t Js.meth;
addAll : 'd. 'd Js.t -> unit Js.meth;
addEvents : 'g. 'g Js.t -> unit Js.meth;
addListener : 'h 'i 'j 'k 'l.
'h Js.t ->
'i Js.callback Js.optdef ->
'j Js.t Js.optdef -> 'k Js.t Js.optdef -> 'l Js.t Js.meth;
addManagedListener : 'm 'n 'o 'p 'q 'r.
'm Js.t ->
'n Js.t ->
'o Js.callback Js.optdef ->
'p Js.t Js.optdef ->
'q Js.t Js.optdef -> 'r Js.t Js.meth;
callParent : 's 't. 's Js.t -> 't Js.t Js.meth;
callSuper : 'u 'v. 'u Js.t -> 'v Js.t Js.meth; clear : unit Js.meth;
clearListeners : unit Js.meth; clearManagedListeners : unit Js.meth;
clone : 'e;
collect : 'w.
Js.js_string Js.t ->
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef -> 'w Js.js_array Js.t Js.meth;
contains : 'x. 'x Js.t -> bool Js.t Js.meth;
containsKey : Js.js_string Js.t -> bool Js.t Js.meth;
each : 'y 'z. 'y Js.callback -> 'z Js.t Js.optdef -> unit Js.meth;
eachKey : 'a1 'b1. 'a1 Js.callback -> 'b1 Js.t Js.optdef -> unit Js.meth;
enableBubble : 'c1. 'c1 Js.t -> unit Js.meth;
filter : 'd1 'e1.
'd1 Js.t ->
'e1 Js.t ->
bool Js.t Js.optdef -> bool Js.t Js.optdef -> 'f Js.t Js.meth;
filterBy : 'f1 'g1.
'f1 Js.callback -> 'g1 Js.t Js.optdef -> 'f Js.t Js.meth;
findBy : 'h1 'i1 'j1.
'h1 Js.callback -> 'i1 Js.t Js.optdef -> 'j1 Js.t Js.meth;
findIndex : 'k1.
Js.js_string Js.t ->
'k1 Js.t ->
Js.number Js.t Js.optdef ->
bool Js.t Js.optdef ->
bool Js.t Js.optdef -> Js.number Js.t Js.meth;
findIndexBy : 'l1 'm1.
'l1 Js.callback ->
'm1 Js.t Js.optdef ->
Js.number Js.t Js.optdef -> Js.number Js.t Js.meth;
fireEvent : 'n1. Js.js_string Js.t -> 'n1 Js.t -> bool Js.t Js.meth;
fireEventArgs : 'o1.
Js.js_string Js.t ->
'o1 Js.t Js.js_array Js.t -> bool Js.t Js.meth;
first : 'p1. 'p1 Js.t Js.meth;
get : 'q1 'r1. 'q1 Js.t -> 'r1 Js.t Js.meth;
getAt : 's1. Js.number Js.t -> 's1 Js.t Js.meth;
getByKey : 't1 'u1. 't1 Js.t -> 'u1 Js.t Js.meth;
getCount : Js.number Js.t Js.meth;
getInitialConfig : 'v1. Js.js_string Js.t Js.optdef -> 'v1 Js.t Js.meth;
getKey : 'w1 'x1. 'w1 Js.t -> 'x1 Js.t Js.meth;
getRange : 'y1.
Js.number Js.t Js.optdef ->
Js.number Js.t Js.optdef -> 'y1 Js.js_array Js.t Js.meth;
hasListener : Js.js_string Js.t -> bool Js.t Js.meth;
hasListeners : 'z1. 'z1 Js.t Js.readonly_prop;
indexOf : 'a2. 'a2 Js.t -> Js.number Js.t Js.meth;
indexOfKey : Js.js_string Js.t -> Js.number Js.t Js.meth;
initConfig : 'b2. 'b2 Js.t -> 'f Js.t Js.meth;
insert : 'c2 'd2 'e2.
Js.number Js.t ->
'c2 Js.t -> 'd2 Js.t Js.optdef -> 'e2 Js.t Js.meth;
isMixedCollection : bool Js.t Js.prop; isObservable : bool Js.t Js.prop;
last : 'f2. 'f2 Js.t Js.meth;
mon : 'g2 'h2 'i2 'j2 'k2 'l2.
'g2 Js.t ->
'h2 Js.t ->
'i2 Js.callback Js.optdef ->
'j2 Js.t Js.optdef -> 'k2 Js.t Js.optdef -> 'l2 Js.t Js.meth;
mun : 'm2 'n2 'o2 'p2.
'm2 Js.t ->
'n2 Js.t ->
'o2 Js.callback Js.optdef -> 'p2 Js.t Js.optdef -> unit Js.meth;
on : 'q2 'r2 's2 't2 'u2.
'q2 Js.t ->
'r2 Js.callback Js.optdef ->
's2 Js.t Js.optdef -> 't2 Js.t Js.optdef -> 'u2 Js.t Js.meth;
relayEvents : 'v2 'w2.
'v2 Js.t ->
Js.js_string Js.t Js.js_array Js.t ->
Js.js_string Js.t Js.optdef -> 'w2 Js.t Js.meth;
remove : 'x2 'y2. 'x2 Js.t -> 'y2 Js.t Js.meth;
removeAll : 'z2. 'z2 Js.js_array Js.t Js.optdef -> 'f Js.t Js.meth;
removeAt : 'a3. Js.number Js.t -> 'a3 Js.t Js.meth;
removeAtKey : 'b3. Js.js_string Js.t -> 'b3 Js.t Js.meth;
removeListener : 'c3 'd3.
Js.js_string Js.t ->
'c3 Js.callback -> 'd3 Js.t Js.optdef -> unit Js.meth;
removeManagedListener : 'e3 'f3 'g3 'h3.
'e3 Js.t ->
'f3 Js.t ->
'g3 Js.callback Js.optdef ->
'h3 Js.t Js.optdef -> unit Js.meth;
removeRange : 'i3.
Js.number Js.t ->
Js.number Js.t Js.optdef -> 'i3 Js.t Js.meth;
replace : 'j3 'k3. Js.js_string Js.t -> 'j3 Js.t -> 'k3 Js.t Js.meth;
resumeEvent : Js.js_string Js.t -> unit Js.meth;
resumeEvents : unit Js.meth; self : Ext_Class.t Js.t Js.prop;
statics : Ext_Class.t Js.t Js.meth;
sum : Js.js_string Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.optdef ->
Js.number Js.t Js.optdef -> Js.number Js.t Js.meth;
suspendEvent : Js.js_string Js.t -> unit Js.meth;
suspendEvents : bool Js.t -> unit Js.meth;
un : 'l3 'm3.
Js.js_string Js.t ->
'l3 Js.callback -> 'm3 Js.t Js.optdef -> unit Js.meth;
updateKey : 'n3 'o3. 'n3 Js.t -> 'o3 Js.t -> unit Js.meth; .. >
as 'f)
Js.t Js.meth as 'e

Creates a shallow copy of this collection


method collect : 'w.
Js.js_string Js.t ->
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef -> 'w Js.js_array Js.t Js.meth

Collects unique values of a particular property in this MixedCollection

Parameters:

Returns:


method contains : 'x. 'x Js.t -> bool Js.t Js.meth

Returns true if the collection contains the passed Object as an item.

Parameters:

Returns:


method containsKey : Js.js_string Js.t -> bool Js.t Js.meth

Returns true if the collection contains the passed Object as a key.

Parameters:

Returns:


method each : 'y 'z. 'y Js.callback -> 'z Js.t Js.optdef -> unit Js.meth

Executes the specified function once for every item in the collection. The function should return a boolean value. Returning false from the function will stop the iteration.

Parameters:


method eachKey : 'a1 'b1. 'a1 Js.callback -> 'b1 Js.t Js.optdef -> unit Js.meth

Executes the specified function once for every key in the collection, passing each key, and its associated item as the first two parameters.

Parameters:


method filter : 'd1 'e1.
'd1 Js.t ->
'e1 Js.t -> bool Js.t Js.optdef -> bool Js.t Js.optdef -> 'f Js.t Js.meth

Filters the objects in this collection by a set of Filters, or by a single property/value pair with optional parameters for substring matching and case sensitivity. See Filter for an example of using Filter objects (preferred). Alternatively, MixedCollection can be easily filtered by property like this:

//create a simple store with a few people defined var people = new Ext.util.MixedCollection(); people.addAll([ {id: 1, age: 25, name: 'Ed'}, {id: 2, age: 24, name: 'Tommy'}, {id: 3, age: 24, name: 'Arne'}, {id: 4, age: 26, name: 'Aaron'} ]);

//a new MixedCollection containing only the items where age == 24 var middleAged = people.filter('age', 24);

Parameters:

Returns:


method filterBy : 'f1 'g1. 'f1 Js.callback -> 'g1 Js.t Js.optdef -> 'f Js.t Js.meth

Filter by a function. Returns a new collection that has been filtered. The passed function will be called with each object in the collection. If the function returns true, the value is included otherwise it is filtered.

Parameters:

Returns:


method findBy : 'h1 'i1 'j1. 'h1 Js.callback -> 'i1 Js.t Js.optdef -> 'j1 Js.t Js.meth

Returns the first item in the collection which elicits a true return value from the passed selection function.

Parameters:

Returns:


method findIndex : 'k1.
Js.js_string Js.t ->
'k1 Js.t ->
Js.number Js.t Js.optdef ->
bool Js.t Js.optdef -> bool Js.t Js.optdef -> Js.number Js.t Js.meth

Finds the index of the first matching object in this collection by a specific property/value.

Parameters:

Returns:


method findIndexBy : 'l1 'm1.
'l1 Js.callback ->
'm1 Js.t Js.optdef -> Js.number Js.t Js.optdef -> Js.number Js.t Js.meth

Find the index of the first matching object in this collection by a function. If the function returns true it is considered a match.

Parameters:

Returns:


method first : 'p1. 'p1 Js.t Js.meth

Returns the first item in the collection.

Returns:


method get : 'q1 'r1. 'q1 Js.t -> 'r1 Js.t Js.meth

Returns the item associated with the passed key OR index. Key has priority over index. This is the equivalent of calling getByKey first, then if nothing matched calling getAt.

Parameters:

Returns:


method getAt : 's1. Js.number Js.t -> 's1 Js.t Js.meth

Returns the item at the specified index.

Parameters:

Returns:


method getByKey : 't1 'u1. 't1 Js.t -> 'u1 Js.t Js.meth

Returns the item associated with the passed key.

Parameters:

Returns:


method getCount : Js.number Js.t Js.meth

Returns the number of items in the collection.

Returns:


method getKey : 'w1 'x1. 'w1 Js.t -> 'x1 Js.t Js.meth

A function which will be called, passing a newly added object when the object is added without a separate id. The function should yield the key by which that object will be indexed.

If no key is yielded, then the object will be added, but it cannot be accessed or removed quickly. Finding it in this collection for interrogation or removal will require a linear scan of this collection's items.

The default implementation simply returns item.id but you can provide your own implementation to return a different value as in the following examples:

// normal way
var mc = new Ext.util.MixedCollection();
mc.add(someEl.dom.id, someEl);
mc.add(otherEl.dom.id, otherEl);
//and so on

// using getKey
var mc = new Ext.util.MixedCollection({
    getKey: function(el){
        return el.dom.id;
    }
});
mc.add(someEl);
mc.add(otherEl);

Parameters:

Returns:


method getRange : 'y1.
Js.number Js.t Js.optdef ->
Js.number Js.t Js.optdef -> 'y1 Js.js_array Js.t Js.meth

Returns a range of items in this collection

Parameters:

Returns:


method indexOf : 'a2. 'a2 Js.t -> Js.number Js.t Js.meth

Returns index within the collection of the passed Object.

Parameters:

Returns:


method indexOfKey : Js.js_string Js.t -> Js.number Js.t Js.meth

Returns index within the collection of the passed key.

Parameters:

Returns:


method insert : 'c2 'd2 'e2.
Js.number Js.t -> 'c2 Js.t -> 'd2 Js.t Js.optdef -> 'e2 Js.t Js.meth

Inserts an item at the specified index in the collection. Fires the add event when complete.

Parameters:

Returns:


method last : 'f2. 'f2 Js.t Js.meth

Returns the last item in the collection.

Returns:


method remove : 'x2 'y2. 'x2 Js.t -> 'y2 Js.t Js.meth

Remove an item from the collection.

Parameters:

Returns:


method removeAll : 'z2. 'z2 Js.js_array Js.t Js.optdef -> 'f Js.t Js.meth

Remove all items in the collection. Can also be used to remove only the items in the passed array.

Parameters:

Returns:


method removeAt : 'a3. Js.number Js.t -> 'a3 Js.t Js.meth

Remove an item from a specified index in the collection. Fires the remove event when complete.

Parameters:

Returns:


method removeAtKey : 'b3. Js.js_string Js.t -> 'b3 Js.t Js.meth

Removes an item associated with the passed key fom the collection.

Parameters:

Returns:


method removeRange : 'i3. Js.number Js.t -> Js.number Js.t Js.optdef -> 'i3 Js.t Js.meth

Remove a range of items starting at a specified index in the collection. Does not fire the remove event.

Parameters:

Returns:


method replace : 'j3 'k3. Js.js_string Js.t -> 'j3 Js.t -> 'k3 Js.t Js.meth

Replaces an item in the collection. Fires the replace event when complete.

Parameters:

Returns:


method sum : Js.js_string Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.optdef ->
Js.number Js.t Js.optdef -> Js.number Js.t Js.meth

Collects all of the values of the given property and returns their sum

Parameters:

Returns:


method updateKey : 'n3 'o3. 'n3 Js.t -> 'o3 Js.t -> unit Js.meth

Change the key for an existing item in the collection. If the old key does not exist this is a no-op.

Parameters: