/// class PD.Web.UI.Controls.GridWidgetCollection

PD.Web.UI.Controls.GridWidgetCollection =
Class.extend({

    //===================================
    // FIELDS
    //===================================

    _innerList: null,

    //===================================
    // CONSTRUCTOR
    //===================================

    init: function (options) {
        this._innerList = new PD.BCL.List();
    },

    //===================================
    // PUBLIC METHODS
    //===================================

    each: function (func) {
        return this._innerList.each(func);
    },

    add: function (item) {
        this._innerList.add(item);
    },

    remove: function (item) {
        this._innerList.remove(item);
    },

    clear: function (item) {
        this._innerList.clear();
    },

    count: function (item) {
        return this._innerList.count();
    },

    toArray: function () {
        return this._innerList.toArray();
    },

    get: function (id) {

        var result = null;

        this.each(function (index, item) {
            if (item.get_id() === id) {
                result = item;
                return false;
            }
        });

        return result;

    }

});