code: def _scan_constraint_match(self, minimum_version, maximum_version, jdk):
      
  
      for dist in self._cache.values():
        if minimum_version and dist.version < minimum_version:
          continue
        if maximum_version and dist.version > maximum_version:
          continue
        if jdk and not dist.jdk:
          continue
        return dist
docs: Finds a cached version matching the specified constraints
  
      :param Revision minimum_version: minimum jvm version to look for (eg, 1.7).
      :param Revision maximum_version: maximum jvm version to look for (eg, 1.7.9999).
      :param bool jdk: whether the found java distribution is required to have a jdk.
      :return: the Distribution, or None if no matching distribution is in the cache.
      :rtype: :class:`pants.java.distribution.Distribution`