public function update(string $key, $oldValue, $newValue, AbstractElement $element)
	{
		if (!isset($this->index[$key])) {
			throw new MissingAttrIndexException("Attribute index \"$key\" is not defined.");
		}

		$id = $element->getId();

		if (isset($this->index[$key][$oldValue][$id])) {
			unset($this->index[$key][$oldValue][$id]);
		} else {
			throw new MissingElementException("Old value of \"$id\" is not indexed.");
		}

		$this->index[$key][$newValue][$id] = $element;
	}