public function getById($id)
    {
        if (isset($this->elements[$id])) {
            return $this->elements[$id];
        }

        throw new \InvalidArgumentException(sprintf('Element for id %s does not exist', $id));
    }