public static int checkIncludedInInteger(
    final int x,
    final String x_name,
    final RangeInclusiveI range,
    final String range_name)
  {
    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",
      Integer.valueOf(range.lower()),
      x_name,
      Integer.valueOf(x),
      Integer.valueOf(range.upper()),
      range_name);

    throw new RangeCheckException(message);
  }
public static int checkIncludedInInteger(
    final int x,
    final String x_name,
    final RangeInclusiveI range,
    final String range_name)
  {
    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",
      Integer.valueOf(range.lower()),
      x_name,
      Integer.valueOf(x),
      Integer.valueOf(range.upper()),
      range_name);

    throw new RangeCheckException(message);
  }
public static int checkIncludedInInteger ( final int x , final String x_name , final RangeInclusiveI range , final String range_name ) { 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" , Integer . valueOf ( range . lower ( ) ) , x_name , Integer . valueOf ( x ) , Integer . valueOf ( 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

@since 2.0.0
<p > Assert that { @code x } ( named { @code x_name } ) is included in the given range { @code range } ( named { @code range_name } ) . < / p >