|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.aries.util.VersionRange
public final class VersionRange
| Constructor Summary | |
|---|---|
VersionRange(String version)
|
|
VersionRange(String version,
boolean exactVersion)
This method should be used to create a version range from a single version string. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
|
org.osgi.framework.Version |
getExactVersion()
this method returns the exact version from the versionInfo obj. |
org.osgi.framework.Version |
getMaximumVersion()
get the maximum version |
org.osgi.framework.Version |
getMinimumVersion()
get the minimum version |
int |
hashCode()
|
VersionRange |
intersect(VersionRange r)
Create a new version range that is the intersection of this and the argument. |
boolean |
isExactVersion()
check if the versioninfo is the exact version |
boolean |
isMaximumExclusive()
is the maximum version exclusive |
boolean |
isMaximumUnbounded()
is the maximum version unbounded |
boolean |
isMinimumExclusive()
is the minimum version exclusive |
boolean |
matches(org.osgi.framework.Version version)
This method checks that the provided version matches the desired version. |
static VersionRange |
parseVersionRange(String s)
Parse a version range.. |
static VersionRange |
parseVersionRange(String s,
boolean exactVersion)
Parse a version range and indicate if the version is an exact version |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VersionRange(String version)
version - version for the verioninfo
public VersionRange(String version,
boolean exactVersion)
version - version for the versioninfoexactVersion - whether this is an exact version true or goes to infinity
false| Method Detail |
|---|
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectpublic org.osgi.framework.Version getExactVersion()
public org.osgi.framework.Version getMaximumVersion()
public org.osgi.framework.Version getMinimumVersion()
public boolean isMaximumExclusive()
public boolean isMaximumUnbounded()
public boolean isMinimumExclusive()
public boolean matches(org.osgi.framework.Version version)
version - the version.
public boolean isExactVersion()
public VersionRange intersect(VersionRange r)
this and the argument.
In other words, the largest version range that lies within both this and
the parameter.
range - a version range to be intersected with this.
null if no intersection is possible.
public static VersionRange parseVersionRange(String s)
throws IllegalArgumentException
s -
IllegalArgumentException - if the String could not be parsed as a VersionRange
public static VersionRange parseVersionRange(String s,
boolean exactVersion)
throws IllegalArgumentException
s - exactVersion -
IllegalArgumentException - if the String could not be parsed as a VersionRange
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||