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
VersionRanges out of passed in VersionRange collection. |
static VersionRange |
from(VersionRange... ranges)
Creates union
VersionRanges 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)
VersionRanges 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)
VersionRanges out of passed in VersionRange collection.ranges - The ranges, may be empty collection or even null.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.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 equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object