public function setStartIndex(int $startIndex): self
    {
        if ($startIndex < 1) {
            throw new \RangeException('The start index must be 1 or greater.');
        }

        $this->startIndex = $startIndex;

        return $this;
    }