public function remove($key) {
       if (!isset($this->hashmap[$key])) { return false; }
       $nodeToRemove = $this->hashmap[$key];
       $this->detach($nodeToRemove);
       unset($this->hashmap[$nodeToRemove->getKey()]);
       return true;
     }