public class PackageVersion extends Object implements Comparable
This implements the semantics given in http://www.w3.org/TR/xslt-30/#package-versions, where a series of dot-separated integers may be followed optionally by '-'NCName
Modifier and Type | Field and Description |
---|---|
static PackageVersion |
MAX_VALUE |
static PackageVersion |
ONE_ZERO |
List<Integer> |
parts |
String |
suffix |
static PackageVersion |
ZERO |
Constructor and Description |
---|
PackageVersion(int[] values)
Return a package version defined by a fixed sequence of int values, which implies no suffix
|
PackageVersion(String s)
Generate a package version from a string description
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o) |
boolean |
equals(Object o) |
String |
getStringValue() |
boolean |
isPrefix(PackageVersion v)
Tests whether this package version is a prefix (i.e.
|
public String suffix
public static PackageVersion ZERO
public static PackageVersion ONE_ZERO
public static PackageVersion MAX_VALUE
public PackageVersion(int[] values)
values
- the sequence of integer componentspublic PackageVersion(String s) throws XPathException
s
- The input string describing the package version according to the grammar given at:
http://www.w3.org/TR/xslt-30/#package-versionsXPathException
public int compareTo(Object o)
compareTo
in interface Comparable
public String getStringValue()
public boolean isPrefix(PackageVersion v)
v
- The version to be checked that it is equal, or 'extends' this versionCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.