public function remove($key) {
        $value = $this->elements[$this->hash($key)];
        unset($this->elements[$this->hash($key)]);
        $this->fire(new MapRemoveEvent($key, $value));
        return $value;
    }