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 booleanequals(java.lang.Object obj)inthashCode()VersionparseVersion(java.lang.String version)Parses the specified version string, for example "1.0".VersionConstraintparseVersionConstraint(java.lang.String constraint)Parses the specified version constraint specification, for example "1.0" or "[1.0,2.0),(2.0,)".VersionRangeparseVersionRange(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:VersionSchemeParses the specified version string, for example "1.0".- Specified by:
parseVersionin 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:VersionSchemeParses the specified version range specification, for example "[1.0,2.0)".- Specified by:
parseVersionRangein 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:VersionSchemeParses the specified version constraint specification, for example "1.0" or "[1.0,2.0),(2.0,)".- Specified by:
parseVersionConstraintin 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-