Package net.sf.saxon.style
Class PackageVersionRanges
- java.lang.Object
-
- net.sf.saxon.style.PackageVersionRanges
-
public class PackageVersionRanges extends java.lang.Object
A class to handle a set of package version rangesThis 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 matchpackage-version'.*'
- any package whose version starts with the given prefixpackage-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 versionpackage-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 PackageVersionRangesjava.lang.String
toString()
-
-
-
Constructor Detail
-
PackageVersionRanges
public PackageVersionRanges(java.lang.String s) throws XPathException
Generate a set of package version ranges- Parameters:
s
- Input string describing the ranges in the grammar described in http://www.w3.org/TR/xslt-30/#package-versions- Throws:
XPathException
-
-
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 classjava.lang.Object
-
-