org.apache.aries.application
Interface VersionRange


public interface VersionRange

A representation of a Version Range. @see section 3.2.6 of the OSGi Service Platform Core Specification.


Method Summary
 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
 VersionRange intersect(VersionRange range)
          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 tests to see if the provided version is inside this range.
 

Method Detail

getExactVersion

org.osgi.framework.Version getExactVersion()
this method returns the exact version from the versionInfo obj. this is used for DeploymentContent only to return a valid exact version otherwise, null is returned.

Returns:

getMaximumVersion

org.osgi.framework.Version getMaximumVersion()
get the maximum version

Returns:
the maximum version

getMinimumVersion

org.osgi.framework.Version getMinimumVersion()
get the minimum version

Returns:
the minimum version

isMaximumExclusive

boolean isMaximumExclusive()
is the maximum version exclusive

Returns:

isMaximumUnbounded

boolean isMaximumUnbounded()
is the maximum version unbounded

Returns:

isMinimumExclusive

boolean isMinimumExclusive()
is the minimum version exclusive

Returns:

isExactVersion

boolean isExactVersion()
check if the versioninfo is the exact version

Returns:

matches

boolean matches(org.osgi.framework.Version version)
This method tests to see if the provided version is inside this range.

Parameters:
version - the version to test.
Returns:
true if the version matches, false otherwise.

intersect

VersionRange intersect(VersionRange range)
Create a new version range that is the intersection of this and the argument. In other words, the largest version range that lies within both this and the parameter.

Parameters:
range - a version range to be intersected with this.
Returns:
a new version range, or null if no intersection is possible.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.