public function freeze(): void
    {
        $this->frozen = true;
        foreach ($this->data as $value) {
            if ($value instanceof self) {
                $value->freeze();
            }
        }
    }