Topo2Collection is a Class that contains a Collection of Models.
#Usage
// Empty Collection var collection = new Collection(); // Create a Collection with data var collection = new Collection([]: JsonArray)
#Exposed methods
Is called after the Object Creation
If data is a Json Object/Array, it will convert the data to a Model
object If data is a Model
it will be added with no conversion. Note that an id
property is required.
Find and remove the Model from the collection
Returns a model with the given Id.
Require the comparator
property to be set on the collection. If set it will order the models in which the comparator
determines.
Returns an array of Models selected by the filter
Clears and resets the collection
Returns a JSON Array of all the models in the collection