public final class UnionVersionRange extends java.lang.Object implements VersionRange
VersionRange.Bound
Modifier and Type | Field and Description |
---|---|
private VersionRange.Bound |
lowerBound |
private java.util.Set<VersionRange> |
ranges |
private VersionRange.Bound |
upperBound |
Modifier | Constructor and Description |
---|---|
private |
UnionVersionRange(java.util.Collection<? extends VersionRange> ranges) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsVersion(Version version)
Determines whether the specified version is contained within this range.
|
boolean |
equals(java.lang.Object obj) |
static VersionRange |
from(java.util.Collection<? extends VersionRange> ranges)
Creates union
VersionRange s out of passed in VersionRange collection. |
static VersionRange |
from(VersionRange... ranges)
Creates union
VersionRange s out of passed in VersionRange instances. |
VersionRange.Bound |
getLowerBound()
Gets a lower bound (if any) for this range.
|
VersionRange.Bound |
getUpperBound()
Gets an upper bound (if any) for this range.
|
int |
hashCode() |
java.lang.String |
toString() |
private final java.util.Set<VersionRange> ranges
private final VersionRange.Bound lowerBound
private final VersionRange.Bound upperBound
private UnionVersionRange(java.util.Collection<? extends VersionRange> ranges)
public static VersionRange from(VersionRange... ranges)
VersionRange
s out of passed in VersionRange
instances.ranges
- The ranges, may be empty array or even null
.public static VersionRange from(java.util.Collection<? extends VersionRange> ranges)
VersionRange
s out of passed in VersionRange
collection.ranges
- The ranges, may be empty collection or even null
.public boolean containsVersion(Version version)
VersionRange
containsVersion
in interface VersionRange
version
- The version to test, must not be null
.true
if this range contains the specified version, false
otherwise.public VersionRange.Bound getLowerBound()
VersionRange
getLowerBound
in interface VersionRange
null
is there is none.public VersionRange.Bound getUpperBound()
VersionRange
getUpperBound
in interface VersionRange
null
is there is none.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object