public boolean isCompatible ( DefaultVersionRange otherRange ) { int lowerCompare = compareTo ( this . lowerBound , this . lowerBoundInclusive , otherRange . lowerBound , otherRange . lowerBoundInclusive , false ) ; int upperCompare = compareTo ( this . upperBound , this . upperBoundInclusive , otherRange . upperBound , otherRange . upperBoundInclusive , true ) ; // Both ranges have one bound in common if ( lowerCompare == 0 || upperCompare == 0 ) { return true ; } // This range is included in the provided range if ( lowerCompare > 0 && upperCompare < 0 ) { return true ; } // The provided range is included in this range if ( lowerCompare < 0 && upperCompare > 0 ) { return true ; } // Validate intersections return lowerCompare < 0 ? isCompatible ( this . upperBound , this . upperBoundInclusive , otherRange . lowerBound , otherRange . lowerBoundInclusive ) : isCompatible ( otherRange . upperBound , otherRange . upperBoundInclusive , this . lowerBound , this . lowerBoundInclusive ) ; }
Indicate if the provided version range is compatible with the provided version range .