Save This Page
Home » maven-2.0.9-src » org.apache » maven » artifact » versioning » [javadoc | source]
org.apache.maven.artifact.versioning
public class: VersionRange [javadoc | source]
java.lang.Object
   org.apache.maven.artifact.versioning.VersionRange
Construct a version range from a specification.
Method from org.apache.maven.artifact.versioning.VersionRange Summary:
cloneOf,   containsVersion,   createFromVersion,   createFromVersionSpec,   equals,   getRecommendedVersion,   getRestrictions,   getSelectedVersion,   hasRestrictions,   hashCode,   isSelectedVersionKnown,   matchVersion,   restrict,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.maven.artifact.versioning.VersionRange Detail:
 public VersionRange cloneOf() 
 public boolean containsVersion(ArtifactVersion version) 
 public static VersionRange createFromVersion(String version) 
 public static VersionRange createFromVersionSpec(String spec) throws InvalidVersionSpecificationException 
    Create a version range from a string representation Some spec examples are
    • 1.0 Version 1.0
    • [1.0,2.0) Versions 1.0 (included) to 2.0 (not included)
    • [1.0,2.0] Versions 1.0 to 2.0 (both included)
    • [1.5,) Versions 1.5 and higher
    • (,1.0],[1.2,) Versions up to 1.0 (included) and 1.2 or higher
 public boolean equals(Object obj) 
 public ArtifactVersion getRecommendedVersion() 
 public List getRestrictions() 
 public ArtifactVersion getSelectedVersion(Artifact artifact) throws OverConstrainedVersionException 
 public boolean hasRestrictions() 
 public int hashCode() 
 public boolean isSelectedVersionKnown(Artifact artifact) throws OverConstrainedVersionException 
 public ArtifactVersion matchVersion(List versions) 
 public VersionRange restrict(VersionRange restriction) 
    Creates and returns a new VersionRange that is a restriction of this version range and the specified version range.

    Note: Precedence is given to the recommended version from this version range over the recommended version from the specified version range.

 public String toString()