code: protected static int calculateShift(int minimumValue, int maximumValue) {
  		int shift = 0;
  		int value = 1;
  		while (value < minimumValue && value < maximumValue) {
  			value <<= 1;
  			shift++;
  		}
  		return shift;
  	}
docs: Calculate a shift value that can be used to create a power-of-two value between
  the specified maximum and minimum values.
  @param minimumValue the minimum value
  @param maximumValue the maximum value
  @return the calculated shift (use {@code 1 << shift} to obtain a value)