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
 Version getExactVersion()
          this method returns the exact version from the versionInfo obj.
 Version getMaximumVersion()
          get the maximum version
 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(Version version)
          This method tests to see if the provided version is inside this range.
 

Method Detail

getExactVersion

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:
the exact version

getMaximumVersion

Version getMaximumVersion()
get the maximum version

Returns:
the maximum version

getMinimumVersion

Version getMinimumVersion()
get the minimum version

Returns:
the minimum version

isMaximumExclusive

boolean isMaximumExclusive()
is the maximum version exclusive

Returns:
is the max version in the range.

isMaximumUnbounded

boolean isMaximumUnbounded()
is the maximum version unbounded

Returns:
true if no upper bound was specified.

isMinimumExclusive

boolean isMinimumExclusive()
is the minimum version exclusive

Returns:
true if the min version is in range.

isExactVersion

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

Returns:
true if the range will match 1 exact version.

matches

boolean matches(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.