Class TestVersionScheme
- java.lang.Object
-
- org.eclipse.aether.internal.test.util.TestVersionScheme
-
- All Implemented Interfaces:
VersionScheme
final class TestVersionScheme extends java.lang.Object implements VersionScheme
A version scheme using a generic version syntax.
-
-
Constructor Summary
Constructors Constructor Description TestVersionScheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
Version
parseVersion(java.lang.String version)
Parses the specified version string, for example "1.0".VersionConstraint
parseVersionConstraint(java.lang.String constraint)
Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0),(2.0,)".VersionRange
parseVersionRange(java.lang.String range)
Parses the specified version range specification, for example "[1.0,2.0)".
-
-
-
Method Detail
-
parseVersion
public Version parseVersion(java.lang.String version)
Description copied from interface:VersionScheme
Parses the specified version string, for example "1.0".- Specified by:
parseVersion
in interfaceVersionScheme
- Parameters:
version
- The version string to parse, must not benull
.- Returns:
- The parsed version, never
null
.
-
parseVersionRange
public VersionRange parseVersionRange(java.lang.String range) throws InvalidVersionSpecificationException
Description copied from interface:VersionScheme
Parses the specified version range specification, for example "[1.0,2.0)".- Specified by:
parseVersionRange
in interfaceVersionScheme
- Parameters:
range
- The range specification to parse, must not benull
.- Returns:
- The parsed version range, never
null
. - Throws:
InvalidVersionSpecificationException
- If the range specification violates the syntax rules of this scheme.
-
parseVersionConstraint
public VersionConstraint parseVersionConstraint(java.lang.String constraint) throws InvalidVersionSpecificationException
Description copied from interface:VersionScheme
Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0),(2.0,)".- Specified by:
parseVersionConstraint
in interfaceVersionScheme
- Parameters:
constraint
- The constraint specification to parse, must not benull
.- Returns:
- The parsed version constraint, never
null
. - Throws:
InvalidVersionSpecificationException
- If the constraint specification violates the syntax rules of this scheme.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-