/// <inheritdoc />
        public int CompareTo(object?obj)
        {
            if (obj is null || !HasValue)
            {
                return(1);
            }

            return(obj switch
            {
                OpenXmlComparableSimpleValue <T> other => CompareTo(other.Value),
                T t => CompareTo(t),
                _ => Value.CompareTo(obj),
            });
 /// <inheritdoc />
 public bool Equals(OpenXmlComparableSimpleValue <T> other)
 {
     return(!(other is null) && Value.Equals(other.Value));
 }
 /// <inheritdoc />
 public int CompareTo(OpenXmlComparableSimpleValue <T> other)
 {
     return(other is null ? 1 : Value.CompareTo(other.Value));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="OpenXmlComparableSimpleValue{T}"/>
 /// class by deep copying the supplied <see cref="OpenXmlComparableSimpleValue{T}"/>
 /// value.
 /// </summary>
 /// <param name="source">The source <see cref="OpenXmlComparableSimpleValue{T}"/> instance.</param>
 private protected OpenXmlComparableSimpleValue(OpenXmlComparableSimpleValue <T> source) : base(source)
 {
 }