public final class GenericVersionScheme extends Object implements org.eclipse.aether.version.VersionScheme
This scheme accepts versions of any form, interpreting a version as a sequence of numeric and alphabetic components. The characters '-', '_', and '.' as well as the mere transitions from digit to letter and vice versa delimit the version components. Delimiters are treated as equivalent.
Numeric components are compared mathematically, alphabetic components are compared lexicographically and case-insensitively. However, the following qualifier strings are recognized and treated specially: "alpha" = "a" < "beta" = "b" < "milestone" = "m" < "cr" = "rc" < "snapshot" < "final" = "ga" < "sp". All of those well-known qualifiers are considered smaller/older than other strings. An empty component/string is equivalent to 0.
Numbers and strings are considered incomparable against each other. Where version components of different kind would collide, comparison will instead assume that the previous components are padded with 0 or "ga", respectively, until the kind mismatch is resolved, i.e. 1-alpha = 1.0.0-alpha < 1.0.1-ga = 1.0.1.
| Constructor and Description |
|---|
GenericVersionScheme()
Creates a new instance of the version scheme for parsing versions.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
org.eclipse.aether.version.Version |
parseVersion(String version) |
org.eclipse.aether.version.VersionConstraint |
parseVersionConstraint(String constraint) |
org.eclipse.aether.version.VersionRange |
parseVersionRange(String range) |
public GenericVersionScheme()
public org.eclipse.aether.version.Version parseVersion(String version) throws org.eclipse.aether.version.InvalidVersionSpecificationException
parseVersion in interface org.eclipse.aether.version.VersionSchemeorg.eclipse.aether.version.InvalidVersionSpecificationExceptionpublic org.eclipse.aether.version.VersionRange parseVersionRange(String range) throws org.eclipse.aether.version.InvalidVersionSpecificationException
parseVersionRange in interface org.eclipse.aether.version.VersionSchemeorg.eclipse.aether.version.InvalidVersionSpecificationExceptionpublic org.eclipse.aether.version.VersionConstraint parseVersionConstraint(String constraint) throws org.eclipse.aether.version.InvalidVersionSpecificationException
parseVersionConstraint in interface org.eclipse.aether.version.VersionSchemeorg.eclipse.aether.version.InvalidVersionSpecificationExceptionCopyright © 2010-2013 The Eclipse Foundation. All Rights Reserved.