code: public static int compareVersionToRange(Version version, Version minVersion, Version maxVersion) {
  		assert minVersion == null || maxVersion == null || minVersion.compareTo(maxVersion) < 0;
  		if (version == null) {
  			return Integer.MIN_VALUE;
  		}
  		if (minVersion != null && compareVersionsNoQualifier(version, minVersion) < 0) {
  			return -1;
  		}
  		if (maxVersion != null && compareVersionsNoQualifier(version, maxVersion) >= 0) {
  			return 1;
  		}
  		return 0;
  	}
docs: Null-safe compare a version number to a range of version numbers.
  
  <p>The minVersion must be strictly lower to the maxVersion. Otherwise
  the behavior is not predictible.
  
  @param version the version to compare to the range; must not be <code>null</code>.
  @param minVersion the minimal version in the range (inclusive); could be <code>null</code>.
  @param maxVersion the maximal version in the range (exclusive); could be <code>null</code>.
  @return a negative number if the version in lower than the minVersion.
  A positive number if the version is greater than or equal to the maxVersion.
  <code>0</code> if the version is between minVersion and maxVersion.