public class VersionRange
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static VersionRange |
INFINITE
Infinite (covers all) range.
|
Constructor and Description |
---|
VersionRange(Version v)
Creates a new version range that exactly includes the given version.
|
VersionRange(Version low,
boolean lowIncl,
Version high,
boolean highIncl)
Creates a new version range.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static VersionRange |
fromString(java.lang.String str)
Creates a range from a string
|
Version |
getHigh()
Returns the upper bound
|
Version |
getLow()
Returns the lower bound
|
int |
hashCode() |
boolean |
isHighInclusive()
Returns
true if the upper bound is inclusive |
boolean |
isInRange(Version v)
Checks if the given version is in this range.
|
boolean |
isLowInclusive()
Returns
true if the lower bound is inclusive |
java.lang.String |
toString() |
public static final VersionRange INFINITE
public VersionRange(Version low, boolean lowIncl, Version high, boolean highIncl)
low
- lower bound or null
lowIncl
- specifies if lower bound is inclusivehigh
- upper bound or null
highIncl
- specifies if upper bound is inclusivejava.lang.IllegalArgumentException
- if bounds are not validpublic VersionRange(Version v)
v
- the version.public Version getLow()
null
public boolean isLowInclusive()
true
if the lower bound is inclusivetrue
if the lower bound is inclusivepublic Version getHigh()
null
public boolean isHighInclusive()
true
if the upper bound is inclusivetrue
if the upper bound is inclusivepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isInRange(Version v)
v
- the version to checktrue
if the given version is in this range.public static VersionRange fromString(java.lang.String str)
str
- stringCopyright © 2010 - 2020 Adobe. All Rights Reserved