public function isClosed(): bool {
        if ($this->isEmpty()) {
            return true;
        }
        $start = $this->getStartPoint();
        $end = $this->getEndPoint();
        return $start === $end;
    }