ok.js
function (item/*, index*/) {
		var old = item;
		var Constructor;
		if (!(item instanceof ok.Base)) {
			Constructor = this.getConstructor(item);
			item = new Constructor(item);
		}
		var identified = this.identify(item);
		if (identified) {
			identified.set(old);
		}
		else {
			var index = this.findInsertIndex(item);
			this.items.insert(index + 1, item);
		}
	}
function (item/*, index*/) {
		var old = item;
		var Constructor;
		if (!(item instanceof ok.Base)) {
			Constructor = this.getConstructor(item);
			item = new Constructor(item);
		}
		var identified = this.identify(item);
		if (identified) {
			identified.set(old);
		}
		else {
			var index = this.findInsertIndex(item);
			this.items.insert(index + 1, item);
		}
	}
function ( item /*, index*/ ) { var old = item ; var Constructor ; if ( ! ( item instanceof ok . Base ) ) { Constructor = this . getConstructor ( item ) ; item = new Constructor ( item ) ; } var identified = this . identify ( item ) ; if ( identified ) { identified . set ( old ) ; } else { var index = this . findInsertIndex ( item ) ; this . items . insert ( index + 1 , item ) ; } }
Add a single item to this collection
@param {*} item Item to add to collection
@param {int} index Position to add the item
@fires add
Add a single item to this collection