public final class TestVersionConstraint extends Object implements VersionConstraint
| Constructor and Description |
|---|
TestVersionConstraint(Version version)
Creates a version constraint from the specified version.
|
TestVersionConstraint(VersionRange range)
Creates a version constraint from the specified version range.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsVersion(Version version)
Determines whether the specified version satisfies this constraint.
|
boolean |
equals(Object obj) |
VersionRange |
getRange()
Gets the version range of this constraint.
|
Version |
getVersion()
Gets the version recommended by this constraint.
|
int |
hashCode() |
String |
toString() |
public TestVersionConstraint(VersionRange range)
range - The version range, must not be null.public TestVersionConstraint(Version version)
version - The version, must not be null.public VersionRange getRange()
VersionConstraintgetRange in interface VersionConstraintnull if none.public Version getVersion()
VersionConstraintgetVersion in interface VersionConstraintnull if none.public boolean containsVersion(Version version)
VersionConstraintcontainsVersion in interface VersionConstraintversion - The version to test, must not be null.true if the specified version satisfies this constraint, false otherwise.Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.