final class TestVersionRange extends java.lang.Object implements VersionRange
VersionRange.Bound| Modifier and Type | Field and Description |
|---|---|
private Version |
lowerBound |
private boolean |
lowerBoundInclusive |
private Version |
upperBound |
private boolean |
upperBoundInclusive |
| Constructor and Description |
|---|
TestVersionRange(java.lang.String range)
Creates a version range from the specified range specification.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsSnapshots() |
boolean |
containsVersion(Version version)
Determines whether the specified version is contained within this range.
|
private static <T> boolean |
eq(T s1,
T s2) |
boolean |
equals(java.lang.Object obj) |
VersionRange.Bound |
getLowerBound()
Gets a lower bound (if any) for this range.
|
VersionRange.Bound |
getUpperBound()
Gets an upper bound (if any) for this range.
|
private static int |
hash(java.lang.Object obj) |
int |
hashCode() |
private boolean |
isSnapshot(Version version) |
java.lang.String |
toString() |
private final Version lowerBound
private final boolean lowerBoundInclusive
private final Version upperBound
private final boolean upperBoundInclusive
TestVersionRange(java.lang.String range)
throws InvalidVersionSpecificationException
range - The range specification to parse, must not be null.InvalidVersionSpecificationException - If the range could not be parsed.public VersionRange.Bound getLowerBound()
VersionRangegetLowerBound in interface VersionRangenull is there is none.public VersionRange.Bound getUpperBound()
VersionRangegetUpperBound in interface VersionRangenull is there is none.public boolean acceptsSnapshots()
public boolean containsVersion(Version version)
VersionRangecontainsVersion in interface VersionRangeversion - The version to test, must not be null.true if this range contains the specified version, false otherwise.private boolean isSnapshot(Version version)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectprivate static <T> boolean eq(T s1,
T s2)
public int hashCode()
hashCode in class java.lang.Objectprivate static int hash(java.lang.Object obj)
public java.lang.String toString()
toString in class java.lang.Object