public function remove($key)
    {
        if (!isset($this->map[$key])) {
            return null;
        }

        $removed = $this->map[$key];
        unset($this->map[$key]);
        if ($removed instanceof AbstractCriterion) {
            return $removed->getValue();
        }

        return $removed;
    }