org.jboss.deployers.structure.spi.classloading
Class VersionRange

java.lang.Object
  extended by org.jboss.deployers.structure.spi.classloading.VersionRange

public class VersionRange
extends Object

VersionRange.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Field Summary
static VersionRange ALL_VERSIONS
          All versions
 
Constructor Summary
VersionRange(Version low)
          Create a new VersionRange with just a low inclusive check
VersionRange(Version low, boolean lowInclusive, Version high, boolean highInclusive)
          Create a new VersionRange.
VersionRange(Version low, Version high)
          Create a new VersionRange with low inclusive and high non-inclusive
 
Method Summary
 boolean equals(Object obj)
           
 Version getHigh()
          Get the high.
 Version getLow()
          Get the low.
 int hashCode()
           
 boolean isHighInclusive()
          Get the highInclusive.
 boolean isInRange(Version version)
          Test whether a version is in range
 boolean isLowInclusive()
          Get the lowInclusive.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL_VERSIONS

public static final VersionRange ALL_VERSIONS
All versions

Constructor Detail

VersionRange

public VersionRange(Version low)
Create a new VersionRange with just a low inclusive check

Parameters:
low - the low range (null for no lower bound)

VersionRange

public VersionRange(Version low,
                    Version high)
Create a new VersionRange with low inclusive and high non-inclusive

Parameters:
low - the low range (null for no lower bound)
high - the high range (null for no higher bound)

VersionRange

public VersionRange(Version low,
                    boolean lowInclusive,
                    Version high,
                    boolean highInclusive)
Create a new VersionRange.

Parameters:
low - the low range (null for no lower bound)
lowInclusive - whether the low bound is inclusive
high - the high range (null for no higher bound)
highInclusive - whether the high bound is inclusive
Method Detail

getLow

public Version getLow()
Get the low.

Returns:
the low.

isLowInclusive

public boolean isLowInclusive()
Get the lowInclusive.

Returns:
the lowInclusive.

getHigh

public Version getHigh()
Get the high.

Returns:
the high.

isHighInclusive

public boolean isHighInclusive()
Get the highInclusive.

Returns:
the highInclusive.

isInRange

public boolean isInRange(Version version)
Test whether a version is in range

Parameters:
version - the version to test
Returns:
true when the version is in range
Throws:
IllegalArgumentException - for a null version

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 JBoss Inc.. All Rights Reserved.