code: public static void range(double parameter, double lowEndpoint, double highEndpoint, String name) throws IllegalArgumentException {
  		if (lowEndpoint > parameter || parameter > highEndpoint) {
  			throw new IllegalArgumentException(String.format("%s parameter is not in range [%d, %d].", name, lowEndpoint, highEndpoint));
  		}
  	}
docs: Test if numeric parameter is in a given range. Parameter is considered in range if is greater or equal with lower
  endpoint and smaller or equal higher endpoint.
  
  @param parameter invocation numeric parameter,
  @param lowEndpoint range lower endpoint,
  @param highEndpoint range higher endpoint,
  @param name the name of invocation parameter.
  @throws IllegalArgumentException if <code>parameter</code> is not in range.