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()
VersionConstraint
getRange
in interface VersionConstraint
null
if none.public Version getVersion()
VersionConstraint
getVersion
in interface VersionConstraint
null
if none.public boolean containsVersion(Version version)
VersionConstraint
containsVersion
in interface VersionConstraint
version
- The version to test, must not be null
.true
if the specified version satisfies this constraint, false
otherwise.Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.