factory.js revision a007505cc4349c02265073770d3e6d45720661a6
// Generic collection
function Collection() {
}
Collection.prototype = {
_construct: function (items) {
items :
Y.Array( arguments, 0, true );
},
item: function ( i ) {
return this._items[i];
},
var self = this;
});
return self;
},
var self = this;
});
return self;
},
},
var items = [];
}
});
return new this.constructor( items );
},
modulus: function ( n, r ) {
r = r || 0;
var items = [],
self = this;
if ( i % n === r ) {
}
});
return new this.constructor( items );
},
odd: function () {
},
even: function () {
return this.modulus( 2 );
},
size: function () {
},
isEmpty: function () {
return !this.size();
},
return this;
},
if (i > -1) {
}
return this;
}
};
Y.Collection = Collection;
Y.Mix( Collection, {
/**
* Core factory method for creating collection classes.
*
* @method build
* @param o {Function|Object} The seed constructor function or its prototype
* @param config {Object} optional configuration for tweaking class build
* @param proto {Object} optional prototype methods (will override)
* @param statics {Object} optional static members for the collection class
* @return {Function} the list class for the provided constructor
* @static
*/
function C() {
}
prototype = {},
// Passing a constructor function is ok, too
o = isFunction( o ) ? o.prototype : o;
}
} else {
for ( fn in o ) {
if ( isFunction( o[fn] ) ) {
}
}
}
statics ); // static members
},
ret = [];
}
});
};
}
});