|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.mojo.versions.api.ArtifactVersions
public class ArtifactVersions
Holds the results of a search for versions of an artifact.
| Constructor Summary | |
|---|---|
ArtifactVersions(Artifact artifact,
ArtifactVersion[] versions,
Comparator rule)
Creates a new ArtifactVersions instance. |
|
ArtifactVersions(Artifact artifact,
List versions,
Comparator rule)
Creates a new ArtifactVersions instance. |
|
| Method Summary | |
|---|---|
boolean |
containsVersion(String version)
|
Artifact |
getArtifact()
Returns the artifact who's version information we are holding. |
String |
getArtifactId()
Returns the artifactId of the artifact who's versions we are holding. |
String |
getGroupId()
Returns the groupId of the artifact who's versions we are holding. |
ArtifactVersion |
getLatestVersion(ArtifactVersion currentVersion,
ArtifactVersion upperBound)
Returns the latest version newer than the specified current version, but less than the specified upper bound or null if no such version exists. |
ArtifactVersion |
getLatestVersion(ArtifactVersion currentVersion,
ArtifactVersion upperBound,
boolean includeSnapshots)
Returns the latest version newer than the specified current version, but less than the specified upper bound or null if no such version exists. |
ArtifactVersion |
getLatestVersion(VersionRange versionRange,
boolean includeSnapshots)
Returns the latest version within the specified version range or null if no such version exists. |
ArtifactVersion[] |
getNewerVersions(ArtifactVersion version)
Returns all the available versions newer than the provided version. |
ArtifactVersion[] |
getNewerVersions(ArtifactVersion version,
boolean includeSnapshots)
Returns all available versions within the specified version range. |
ArtifactVersion[] |
getNewerVersions(String version)
Returns all the available versions newer than the provided version. |
ArtifactVersion[] |
getNewerVersions(String version,
boolean includeSnapshots)
Returns all available versions within the specified version range. |
ArtifactVersion[] |
getVersions()
Returns all the available versions in increasing order. |
ArtifactVersion[] |
getVersions(boolean includeSnapshots)
Returns all available versions in increasing order. |
ArtifactVersion[] |
getVersions(VersionRange versionRange,
boolean includeSnapshots)
Returns all available versions within the specified version range. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArtifactVersions(Artifact artifact,
ArtifactVersion[] versions,
Comparator rule)
ArtifactVersions instance.
artifact - The artifact.versions - The versions.rule - The version comparison rule.
public ArtifactVersions(Artifact artifact,
List versions,
Comparator rule)
ArtifactVersions instance.
artifact - The artifact.versions - The versions.rule - The version comparison rule.| Method Detail |
|---|
public Artifact getArtifact()
public String getGroupId()
public String getArtifactId()
public ArtifactVersion[] getVersions()
public ArtifactVersion[] getVersions(boolean includeSnapshots)
includeSnapshots - true if snapshots are to be included.
public ArtifactVersion[] getVersions(VersionRange versionRange,
boolean includeSnapshots)
versionRange - The version range within which the version must exist.includeSnapshots - true if snapshots are to be included.
public ArtifactVersion[] getNewerVersions(ArtifactVersion version)
version - The lower (exclusive) bound.
public ArtifactVersion[] getNewerVersions(ArtifactVersion version,
boolean includeSnapshots)
version - The lower (exclusive) bound.includeSnapshots - true if snapshots are to be included.
public ArtifactVersion getLatestVersion(ArtifactVersion currentVersion,
ArtifactVersion upperBound)
null if no such version exists.
currentVersion - the current version.upperBound - the exclusive upper bound.
null if no version is available.
public ArtifactVersion getLatestVersion(ArtifactVersion currentVersion,
ArtifactVersion upperBound,
boolean includeSnapshots)
null if no such version exists.
currentVersion - the current version.upperBound - the exclusive upper bound.includeSnapshots - true if snapshots are to be included.
null if no version is available.
public ArtifactVersion getLatestVersion(VersionRange versionRange,
boolean includeSnapshots)
null if no such version exists.
versionRange - The version range within which the version must exist.includeSnapshots - true if snapshots are to be included.
null if no version is available.public boolean containsVersion(String version)
public ArtifactVersion[] getNewerVersions(String version)
version - The lower (exclusive) bound.
public ArtifactVersion[] getNewerVersions(String version,
boolean includeSnapshots)
version - The lower (exclusive) bound.includeSnapshots - true if snapshots are to be included.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||