public class VersionRange extends Object
Modifier and Type | Field and Description |
---|---|
static VersionRange |
infiniteRange |
Constructor and Description |
---|
VersionRange(org.osgi.framework.Version version)
Creates an instance of the VersionRange class which resembles [version,*)
|
VersionRange(org.osgi.framework.Version low,
boolean isLowInclusive,
org.osgi.framework.Version high,
boolean isHighInclusive)
Create an instance of the VersionRange class.
|
Modifier and Type | Method and Description |
---|---|
org.osgi.framework.Version |
getHigh()
Get the upper boundary of the version range, the boundary being inclusive or not is not taken in to account.
|
org.osgi.framework.Version |
getLow()
Get the lower boundary of the version range, the boundary being inclusive or not is not taken into account.
|
boolean |
isHighInclusive()
Determines whether the upper boundary is inclusive or not.
|
boolean |
isInRange(org.osgi.framework.Version version)
Determine if the specified version is part of the version range or not.
|
boolean |
isLowInclusive()
Determines whether the lower boundary is inclusive or not.
|
static VersionRange |
parse(String range)
Parses a version range from the specified string.
|
String |
toString() |
public static final VersionRange infiniteRange
public VersionRange(org.osgi.framework.Version low, boolean isLowInclusive, org.osgi.framework.Version high, boolean isHighInclusive)
low
- Lower bound versionisLowInclusive
- True if lower bound should be included in the rangehigh
- Upper bound versionisHighInclusive
- True if upper bound should be included in the rangepublic VersionRange(org.osgi.framework.Version version)
version
- The lower boundary of the version rangepublic org.osgi.framework.Version getLow()
public boolean isLowInclusive()
public org.osgi.framework.Version getHigh()
public boolean isHighInclusive()
public boolean isInRange(org.osgi.framework.Version version)
version
- The version to verifypublic static VersionRange parse(String range) throws IllegalArgumentException
range
- String representation of the version range.VersionRange
object representing the version range.IllegalArgumentException
- If range
is improperly formatted.Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.