public Range<V> withMax(V maximum) {

    if (Objects.equals(this.max, maximum)) {
      return this;
    }
    return new Range<>(this.min, maximum);
  }
public Range < V > withMax ( V maximum ) { if ( Objects . equals ( this . max , maximum ) ) { return this ; } return new Range < > ( this . min , maximum ) ; }
@param maximum the new {@link #getMaximumValue() maximum value}.
@return a new {@link Range} where the {@link #getMaximumValue() maximum value} is set to the given {@code max}
value.
@since 7.4.0