Class MavenVersionRangeParser


  • class MavenVersionRangeParser
    extends java.lang.Object
    Parser that understands Maven version ranges of the form (,1.0] and such. More details about such ranges in Maven, can be found {@link https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges here}
    • Constructor Detail

      • MavenVersionRangeParser

        MavenVersionRangeParser()
    • Method Detail

      • currentJavaVersionInRange

        static boolean currentJavaVersionInRange​(java.lang.String range)
        Parameters:
        range - The range to compare against
        Returns:
        Returns true if the current Java version, in which the instance of this class is running, is within the specified range. Else returns false.
      • rangeAccepts

        static boolean rangeAccepts​(java.lang.String range,
                                    java.lang.String value)
        Parameters:
        range - The range to compare against
        value - The value being compared
        Returns:
        Compares the value against the range and returns true if the value lies within the range. Else returns false.
      • stripBoundChars

        private static java.lang.String stripBoundChars​(java.lang.String value)