com.io7m.jranges.core/src/main/java/com/io7m/jranges/RangeCheck.java
public static BigInteger checkIncludedInBig(
    final BigInteger x,
    final String x_name,
    final RangeInclusiveB range,
    final String range_name)
  {
    Objects.requireNonNull(x, "Value");
    Objects.requireNonNull(x_name, "Value name");
    Objects.requireNonNull(range, "Range");
    Objects.requireNonNull(range_name, "Range name");

    if (range.includesValue(x)) {
      return x;
    }

    final var message = String.format(
      "%s <= %s (%s) <= %s (%s) == false",
      range.lower(),
      x_name,
      x,
      range.upper(),
      range_name);

    throw new RangeCheckException(message);
  }
public static BigInteger checkIncludedInBig(
    final BigInteger x,
    final String x_name,
    final RangeInclusiveB range,
    final String range_name)
  {
    Objects.requireNonNull(x, "Value");
    Objects.requireNonNull(x_name, "Value name");
    Objects.requireNonNull(range, "Range");
    Objects.requireNonNull(range_name, "Range name");

    if (range.includesValue(x)) {
      return x;
    }

    final var message = String.format(
      "%s <= %s (%s) <= %s (%s) == false",
      range.lower(),
      x_name,
      x,
      range.upper(),
      range_name);

    throw new RangeCheckException(message);
  }
<p> Assert that {@code x} (named {@code x_name}) is included in the given
range {@code range} (named {@code range_name}). </p>

@param x          The checked value
@param x_name     The name of the checked value
@param range      The inclusive range
@param range_name The name of the inclusive range

@return x