public function set($key, $value)
    {
        if ($this->getElement($key) !== false) {
            $this->collection->set($this->collection->indexOf($value), $value);
        } else {
            $this->collection->add($value);
        }
    }
public function set($key, $value)
    {
        if ($this->getElement($key) !== false) {
            $this->collection->set($this->collection->indexOf($value), $value);
        } else {
            $this->collection->add($value);
        }
    }
{@inheritDoc}