lib/packages/core-classes.js
function(data_source) {

		this.guid = Lava.guid++;

		if (data_source) {

			var count = 0,
				i = 0,
				name;

			if (Array.isArray(data_source)) {

				for (count = data_source.length; i < count; i++) {

					this._push(this._uid++, data_source[i], null);

				}

			} else if (data_source.isCollection) {

				this._data_names = data_source.getNames();
				this._data_values = data_source.getValues();
				for (count = this._data_values.length; i < count; i++) {

					this._data_uids.push(this._uid++);

				}

			} else {

				if (data_source.isProperties) {

					data_source = data_source.getProperties();

				}

				for (name in data_source) {

					this._push(this._uid++, data_source[name], name);

				}

			}

			this._count = this._data_uids.length;

		}

	}
function(data_source) {

		this.guid = Lava.guid++;

		if (data_source) {

			var count = 0,
				i = 0,
				name;

			if (Array.isArray(data_source)) {

				for (count = data_source.length; i < count; i++) {

					this._push(this._uid++, data_source[i], null);

				}

			} else if (data_source.isCollection) {

				this._data_names = data_source.getNames();
				this._data_values = data_source.getValues();
				for (count = this._data_values.length; i < count; i++) {

					this._data_uids.push(this._uid++);

				}

			} else {

				if (data_source.isProperties) {

					data_source = data_source.getProperties();

				}

				for (name in data_source) {

					this._push(this._uid++, data_source[name], name);

				}

			}

			this._count = this._data_uids.length;

		}

	}
function ( data_source ) { this . guid = Lava . guid ++ ; if ( data_source ) { var count = 0 , i = 0 , name ; if ( Array . isArray ( data_source ) ) { for ( count = data_source . length ; i < count ; i ++ ) { this . _push ( this . _uid ++ , data_source [ i ] , null ) ; } } else if ( data_source . isCollection ) { this . _data_names = data_source . getNames ( ) ; this . _data_values = data_source . getValues ( ) ; for ( count = this . _data_values . length ; i < count ; i ++ ) { this . _data_uids . push ( this . _uid ++ ) ; } } else { if ( data_source . isProperties ) { data_source = data_source . getProperties ( ) ; } for ( name in data_source ) { this . _push ( this . _uid ++ , data_source [ name ] , name ) ; } } this . _count = this . _data_uids . length ; } }
Creates Enumerable instance and fills initial data from `data_source`
@param {(Array|Object|Lava.mixin.Properties|Lava.system.Enumerable)} data_source
Creates Enumerable instance and fills initial data from data_source