Add a collection named ``collection``.
172045
def add_collection(collection,
                   cache_size=1000,
                   cache_cls=LRUCache,
                   **cache_args):
    """"""
    assert collection not in _db
    cache = cache_cls(maxsize=cache_size,
                      missing=lambda id: load_object(collection, id),
                      **cache_args)
    _db[collection] = aadict(cache=cache, indexes={})
1046627
def extend(self, collection):
        
        if type(collection) is list:
            if self._col_dict is None and self._col_list is None:
                self._col_list = collection
            else:
                self._col_list += collection
            self._sync_list_to_dict(collection)
        elif type(collection) is dict:
            if self._col_dict is None and self._col_list is None:
                self._col_dict = collection
                self._col_list = collection.values()
            else:
                for key, value in collection.items():
                    self._set_key(key, value)
        else:
            raise NotImplementedError()
1210702
def extend(self, collection):
        """"""
        l_ids = set([a.Id for a in self])
        for acces in collection:
            if not acces.Id in l_ids:
                list.append(self,acces)
                info = collection.get_info(Id=acces.Id)
                if info:
                    self.infos[acces.Id] = info
1257522
function newCollection(_params, _scope) {
      var col = new Collection();
      col.$scope = _scope || Model;
      col.$params = _params;
      col.$initialize();
      return col;
    }
74071
public function addCollection(RequirementCollection $collection)
    {
        $this->requirements = array_merge($this->requirements, $collection->all());
    }
759738
def create_collection_class(collection_name)
      unless class_exists?(collection_name)
        self.const_set(collection_name, Class.new do
          include Foggy::Collection
        end)
      end
    end
226330
protected function addCollection()
    {
        if (!$this->isError()) {
            $id = $this->collection->add($this->getSubmitted());
            if (empty($id)) {
                $this->errorAndExit($this->text('Unexpected result'));
            }
            $this->line($id);
        }
    }
1003702
def collection_name(self, value):
        
        self._collection_name = value
        self._mongo_coll = self.db[value]
        self.collection = TrackedCollection(self._mongo_coll, operation=self._t_op,
                                            field=self._t_field)
1004422
def extend(self, iterable):
        """"""
        return super(Collection, self).extend(
            self._ensure_iterable_is_valid(iterable))
1187426
def collection_name(self, value):
        
        self._collection_name = value
        self.collection = self.db[value]
785394
public void addAll(@NonNull final Collection<T> collection) {
        final int length = collection.size();
        if (length == 0) {
            return;
        }
        synchronized (mLock) {
            final int position = getItemCount();
            mObjects.addAll(collection);
            notifyItemRangeInserted(position, length);
        }
    }
400790
protected function addCollectionItem()
    {
        if (!$this->isError()) {
            $id = $this->collection_item->add($this->getSubmitted());
            if (empty($id)) {
                $this->errorAndExit($this->text('Unexpected result'));
            }
            $this->line($id);
        }
    }
461105
public function addCollection(self $collection)
    {
        $this->renderDefinitions = \array_merge($this->renderDefinitions, $collection->all());
        $this->resources = \array_merge($this->resources, $collection->getResources());
    }
1051025
public void addAll(Collection<BugInstance> collection, boolean updateActiveTime) {
        for (BugInstance warning : collection) {
            add(warning, updateActiveTime);
        }
    }
290038
public function addManyToManyCollections($collections)
    {
        if (!is_array($collections)) {
            $collections = [$collections];
        }
        $this->manyToManyCollections = array_merge($this->manyToManyCollections, $collections);

        return $this;
    }
757812
def add_collection(self, identifier_collection):
        
        try:
            new_source_identifiers = identifier_collection.source_identifiers
            self.source_identifiers.update(new_source_identifiers)
        except AttributeError:
            msg = "Invalid identifier collection passed as argument"
            raise AttributeError(msg)
479353
function Collection(options) {
  if (!(this instanceof Collection)) {
    return new Collection(options);
  }

  Base.call(this, {}, options);
  this.is('Collection');
  this.items = {};

  this.use(utils.option());
  this.use(utils.plugin());
  this.init(options || {});
}