public function setDefault($default) : Value
    {
        if (isset($default) && !$this->mode->is(Value::OPTIONAL)) {
            throw new \InvalidArgumentException('Cannot set a default value for non-optional values.');
        }

        $this->default = $default;

        return $this;
    }