tinymce.full.js
function (items) {
        var self = this, len = self.length, i;

        self.length = 0;
        self.add(items);

        // Remove old entries
        for (i = self.length; i < len; i++) {
          delete self[i];
        }

        return self;
      }
function (items) {
        var self = this, len = self.length, i;

        self.length = 0;
        self.add(items);

        // Remove old entries
        for (i = self.length; i < len; i++) {
          delete self[i];
        }

        return self;
      }
function ( items ) { var self = this , len = self . length , i ; self . length = 0 ; self . add ( items ) ; // Remove old entries for ( i = self . length ; i < len ; i ++ ) { delete self [ i ] ; } return self ; }
Sets the contents of the collection. This will remove any existing items
and replace them with the ones specified in the input array.

@method set
@param {Array} items Array with items to set into the Collection.
@return {tinymce.ui.Collection} Collection instance.
Sets the contents of the collection . This will remove any existing items and replace them with the ones specified in the input array .