public class VersionRange
extends java.lang.Object
Encapsulates a version range (as specified in the OSGi Service Platform Core Specification, Release 4).
Constructor and Description |
---|
VersionRange(java.lang.String versionRange)
Creates a new instance of type VersionRange.
|
Modifier and Type | Method and Description |
---|---|
Version |
getCeiling()
Returns the ceiling version.
|
Version |
getFloor()
Returns the floor version.
|
boolean |
isCeilingIncluded()
Returns true if a ceiling version is available.
|
boolean |
isFloorIncluded()
Returns true if a floor version is available.
|
boolean |
isMember(Version version)
Returns true if the supplied version is included in this range.
|
boolean |
isSingleVersion()
Returns true if this range is fixed on a specific version.
|
java.lang.String |
toString() |
public VersionRange(java.lang.String versionRange)
versionRange
- the string representation of the version range.public Version getCeiling()
public Version getFloor()
public boolean isCeilingIncluded()
public boolean isFloorIncluded()
public boolean isSingleVersion()
public boolean isMember(Version version)
version
- The version that shall be tested.public java.lang.String toString()
toString
in class java.lang.Object