code: public static VersionRange intersection(Collection<VersionRange> ranges)
     {
        Assert.notNull(ranges, "Version ranges must not be null.");
        Assert.isTrue(ranges.size() >= 1, "Version ranges must not be empty.");
  
        Version min = null;
        Version max = null;
        boolean minInclusive = false;
        boolean maxInclusive = false;
  
        for (VersionRange range : ranges)
        {
           if (min == null || range.getMin().compareTo(min) > 0)
           {
              min = range.getMin();
              minInclusive = range.isMinInclusive();
           }
           if (max == null || range.getMax().compareTo(max) < 0)
           {
              max = range.getMax();
              maxInclusive = range.isMaxInclusive();
           }
        }
  
        return new DefaultVersionRange(min, minInclusive, max, maxInclusive);
     }
docs: Calculate the intersection of one or more {@link VersionRange} instances, returning a single {@link VersionRange}
  as the result.