public static long checkLessLong(
    final long x,
    final String x_name,
    final long in_upper,
    final String upper_name)
  {
    Objects.requireNonNull(x_name, "Value name");
    Objects.requireNonNull(upper_name, "Upper bound name");

    if (x < in_upper) {
      return x;
    }

    @SuppressWarnings("boxing") final var message =
      String.format("%s (%d) >= %s (%d)", x_name, x, upper_name, in_upper);

    throw new RangeCheckException(message);
  }
public static long checkLessLong(
    final long x,
    final String x_name,
    final long in_upper,
    final String upper_name)
  {
    Objects.requireNonNull(x_name, "Value name");
    Objects.requireNonNull(upper_name, "Upper bound name");

    if (x < in_upper) {
      return x;
    }

    @SuppressWarnings("boxing") final var message =
      String.format("%s (%d) >= %s (%d)", x_name, x, upper_name, in_upper);

    throw new RangeCheckException(message);
  }
public static long checkLessLong ( final long x , final String x_name , final long in_upper , final String upper_name ) { Objects . requireNonNull ( x_name , "Value name" ) ; Objects . requireNonNull ( upper_name , "Upper bound name" ) ; if ( x < in_upper ) { return x ; } @ SuppressWarnings ( "boxing" ) final var message = String . format ( "%s (%d) >= %s (%d)" , x_name , x , upper_name , in_upper ) ; throw new RangeCheckException ( message ) ; }
<p> Assert that {@code x} (named {@code x_name}) is less than {@code
in_upper} (named {@code upper_name}). </p>

@param x          The checked value
@param in_upper   The upper bound
@param x_name     The name of the checked value
@param upper_name The name of the upper bound

@return x

@since 2.0.0
<p > Assert that { @code x } ( named { @code x_name } ) is less than { @code in_upper } ( named { @code upper_name } ) . < / p >