Class PackageVersionRanges


  • public class PackageVersionRanges
    extends java.lang.Object
    A class to handle a set of package version ranges

    This implements the semantics given in http://www.w3.org/TR/xslt-30/#package-versions, where a comma-separated sequence of package-version ranges are declared as one of:

    • '*' - any version
    • package-version - an exact match
    • package-version'.*' - any package whose version starts with the given prefix
    • package-version'+' - any package whose version orders equal or later than the given version
    • 'to 'package-version - any package whose version orders equal or earlier than the given version
    • package-version' to 'package-version - any package whose version orders equal to or between the given versions
    • Constructor Summary

      Constructors 
      Constructor Description
      PackageVersionRanges​(java.lang.String s)
      Generate a set of package version ranges
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(PackageVersion version)
      Test whether a given package version lies within any of the ranges described in this PackageVersionRanges
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • contains

        public boolean contains​(PackageVersion version)
        Test whether a given package version lies within any of the ranges described in this PackageVersionRanges
        Parameters:
        version - The version to be checked
        Returns:
        true if the version is contained in any of the ranges, false otherwise
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object