public function add($element) { $this->array[static::getElementKey($element)] = $element; return $this; }