OPS4J Pax Swissbox :: TinyBundles 1.3.1

org.ops4j.pax.swissbox.tinybundles.dp.intern
Class VersionRange

java.lang.Object
  extended by org.ops4j.pax.swissbox.tinybundles.dp.intern.VersionRange

public class VersionRange
extends Object

This class represents a version range as defined in section 3.2.5 of the OSGi r4 specification. From Felix DeploymentAdmin.


Field Summary
static VersionRange infiniteRange
           
 
Constructor Summary
VersionRange(org.osgi.framework.Version version)
          Creates an instance of the VersionRange class which resembles [version,*)
VersionRange(org.osgi.framework.Version low, boolean isLowInclusive, org.osgi.framework.Version high, boolean isHighInclusive)
          Create an instance of the VersionRange class.
 
Method Summary
 org.osgi.framework.Version getHigh()
          Get the upper boundary of the version range, the boundary being inclusive or not is not taken in to account.
 org.osgi.framework.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(org.osgi.framework.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

infiniteRange

public static final VersionRange infiniteRange
Constructor Detail

VersionRange

public VersionRange(org.osgi.framework.Version low,
                    boolean isLowInclusive,
                    org.osgi.framework.Version high,
                    boolean isHighInclusive)
Create an instance of the VersionRange class.

Parameters:
low - Lower bound version
isLowInclusive - True if lower bound should be included in the range
high - Upper bound version
isHighInclusive - True if upper bound should be included in the range

VersionRange

public VersionRange(org.osgi.framework.Version version)
Creates an instance of the VersionRange class which resembles [version,*)

Parameters:
version - The lower boundary of the version range
Method Detail

getLow

public org.osgi.framework.Version getLow()
Get the lower boundary of the version range, the boundary being inclusive or not is not taken into account.

Returns:
Version resembling the lower boundary of the version range

isLowInclusive

public boolean isLowInclusive()
Determines whether the lower boundary is inclusive or not.

Returns:
True if the lower boundary is inclusive, false otherwise.

getHigh

public org.osgi.framework.Version getHigh()
Get the upper boundary of the version range, the boundary being inclusive or not is not taken in to account.

Returns:
Version resembling the upper boundary of the version range.

isHighInclusive

public boolean isHighInclusive()
Determines whether the upper boundary is inclusive or not.

Returns:
True if the upper boundary is inclusive, false otherwise.

isInRange

public boolean isInRange(org.osgi.framework.Version version)
Determine if the specified version is part of the version range or not.

Parameters:
version - The version to verify
Returns:
True if the specified version is included in this version range, false otherwise.

parse

public static VersionRange parse(String range)
                          throws IllegalArgumentException
Parses a version range from the specified string.

Parameters:
range - String representation of the version range.
Returns:
A VersionRange object representing the version range.
Throws:
IllegalArgumentException - If range is improperly formatted.

toString

public String toString()
Overrides:
toString in class Object

OPS4J Pax Swissbox :: TinyBundles 1.3.1

Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.