org.jboss.classloading.spi.helpers
Class NameAndVersionRangeSupport

java.lang.Object
  extended by org.jboss.classloading.spi.helpers.NameAndVersionRangeSupport
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AbstractRequirement

public class NameAndVersionRangeSupport
extends Object
implements Serializable

NameAndVersionRangeSupport.

Version:
$Revision: 1.1 $
Author:
Adrian Brock
See Also:
Serialized Form

Constructor Summary
NameAndVersionRangeSupport()
          Create a new NameAndVersionRangeSupport
NameAndVersionRangeSupport(String name)
          Create a new NameAndVersionRangeSupport with no version constraint
NameAndVersionRangeSupport(String name, VersionRange versionRange)
          Create a new NameAndVersionRangeSupport.
 
Method Summary
 boolean equals(Object obj)
           
 Object getFrom()
          Get the fromVersion.
 Version getFromVersion()
          Get the fromVersion.
 String getName()
          Get the name.
 Object getTo()
          Get the toVersion.
 Version getToVersion()
          Get the toVersion.
 VersionRange getVersionRange()
          Get the versionRange.
 int hashCode()
           
 boolean isFromVersionInclusive()
          Get the fromVersionInclusive.
 boolean isToVersionInclusive()
          Get the toVersionInclusive.
 void setFrom(Object fromVersion)
          Set the fromVersion.
 void setFromVersion(Version fromVersion)
          Set the fromVersion.
 void setFromVersionInclusive(boolean fromVersionInclusive)
          Set the fromVersionInclusive.
 void setName(String name)
          Set the name.
 void setTo(Object toVersion)
          Set the toVersion.
 void setToVersion(Version toVersion)
          Set the toVersion.
 void setToVersionInclusive(boolean toVersionInclusive)
          Set the toVersionInclusive.
 void setVersion(Version version)
          Set a single version as the version range
 void setVersionRange(VersionRange versionRange)
          Set the versionRange.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameAndVersionRangeSupport

public NameAndVersionRangeSupport()
Create a new NameAndVersionRangeSupport


NameAndVersionRangeSupport

public NameAndVersionRangeSupport(String name)
Create a new NameAndVersionRangeSupport with no version constraint

Parameters:
name - the name
Throws:
IllegalArgumentException - for a null name

NameAndVersionRangeSupport

public NameAndVersionRangeSupport(String name,
                                  VersionRange versionRange)
Create a new NameAndVersionRangeSupport.

Parameters:
name - the name
versionRange - the version range - pass null for all versions
Throws:
IllegalArgumentException - for a null name
Method Detail

getName

public String getName()
Get the name.

Returns:
the name.

setName

public void setName(String name)
Set the name.

Parameters:
name - the name.

getVersionRange

public VersionRange getVersionRange()
Get the versionRange.

Returns:
the versionRange.

setVersionRange

public void setVersionRange(VersionRange versionRange)
Set the versionRange.

Parameters:
versionRange - the versionRange.

getFrom

public Object getFrom()
Get the fromVersion.

Returns:
the fromVersion.

setFrom

public void setFrom(Object fromVersion)
Set the fromVersion.

Parameters:
fromVersion - the fromVersion.

getFromVersion

public Version getFromVersion()
Get the fromVersion.

Returns:
the fromVersion.

setFromVersion

public void setFromVersion(Version fromVersion)
Set the fromVersion.

Parameters:
fromVersion - the fromVersion.

isFromVersionInclusive

public boolean isFromVersionInclusive()
Get the fromVersionInclusive.

Returns:
the fromVersionInclusive.

setFromVersionInclusive

public void setFromVersionInclusive(boolean fromVersionInclusive)
Set the fromVersionInclusive.

Parameters:
fromVersionInclusive - the fromVersionInclusive.

getTo

public Object getTo()
Get the toVersion.

Returns:
the toVersion.

setTo

public void setTo(Object toVersion)
Set the toVersion.

Parameters:
toVersion - the toVersion.

getToVersion

public Version getToVersion()
Get the toVersion.

Returns:
the toVersion.

setToVersion

public void setToVersion(Version toVersion)
Set the toVersion.

Parameters:
toVersion - the toVersion.

isToVersionInclusive

public boolean isToVersionInclusive()
Get the toVersionInclusive.

Returns:
the toVersionInclusive.

setToVersionInclusive

public void setToVersionInclusive(boolean toVersionInclusive)
Set the toVersionInclusive.

Parameters:
toVersionInclusive - the toVersionInclusive.

setVersion

public void setVersion(Version version)
Set a single version as the version range

Parameters:
version - the 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 © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.