|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.deploymentadmin.VersionRange
public class VersionRange
This class represents a version range as defined in section 3.2.5 of the OSGi r4 specification.
Field Summary | |
---|---|
static VersionRange |
infiniteRange
|
Constructor Summary | |
---|---|
VersionRange(Version version)
Creates an instance of the VersionRange class which resembles [version,*) |
|
VersionRange(Version low,
boolean isLowInclusive,
Version high,
boolean isHighInclusive)
Create an instance of the VersionRange class. |
Method Summary | |
---|---|
Version |
getHigh()
Get the upper boundary of the version range, the boundary being inclusive or not is not taken in to account. |
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(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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final VersionRange infiniteRange
Constructor Detail |
---|
public VersionRange(Version low, boolean isLowInclusive, 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(Version version)
version
- The lower boundary of the version rangeMethod Detail |
---|
public Version getLow()
public boolean isLowInclusive()
public Version getHigh()
public boolean isHighInclusive()
public boolean isInRange(Version version)
version
- The version to verify
public 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.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |