public final class VersionRangeResult extends Object
Constructor and Description |
---|
VersionRangeResult(VersionRangeRequest request)
Creates a new result for the specified request.
|
Modifier and Type | Method and Description |
---|---|
VersionRangeResult |
addException(Exception exception)
Records the specified exception while resolving the version range.
|
VersionRangeResult |
addVersion(Version version)
Adds the specified version to the result.
|
List<Exception> |
getExceptions()
Gets the exceptions that occurred while resolving the version range.
|
Version |
getHighestVersion()
Gets the highest version matching the requested range.
|
Version |
getLowestVersion()
Gets the lowest version matching the requested range.
|
ArtifactRepository |
getRepository(Version version)
Gets the repository from which the specified version was resolved.
|
VersionRangeRequest |
getRequest()
Gets the resolution request that was made.
|
VersionConstraint |
getVersionConstraint()
Gets the version constraint that was parsed from the artifact's version string.
|
List<Version> |
getVersions()
Gets the versions (in ascending order) that matched the requested range.
|
VersionRangeResult |
setRepository(Version version,
ArtifactRepository repository)
Records the repository from which the specified version was resolved
|
VersionRangeResult |
setVersionConstraint(VersionConstraint versionConstraint)
Sets the version constraint that was parsed from the artifact's version string.
|
VersionRangeResult |
setVersions(List<Version> versions)
Sets the versions (in ascending order) matching the requested range.
|
String |
toString() |
public VersionRangeResult(VersionRangeRequest request)
request
- The resolution request, must not be null
.public VersionRangeRequest getRequest()
null
.public List<Exception> getExceptions()
null
.public VersionRangeResult addException(Exception exception)
exception
- The exception to record, may be null
.null
.public List<Version> getVersions()
null
.public VersionRangeResult addVersion(Version version)
version
- The version to add, must not be null
.null
.public VersionRangeResult setVersions(List<Version> versions)
versions
- The matching versions, may be empty or null
if none.null
.public Version getLowestVersion()
null
if no versions matched the requested range.public Version getHighestVersion()
null
if no versions matched the requested range.public ArtifactRepository getRepository(Version version)
version
- The version whose source repository should be retrieved, must not be null
.null
if unknown.public VersionRangeResult setRepository(Version version, ArtifactRepository repository)
version
- The version whose source repository is to be recorded, must not be null
.repository
- The repository from which the version was resolved, may be null
.null
.public VersionConstraint getVersionConstraint()
null
.public VersionRangeResult setVersionConstraint(VersionConstraint versionConstraint)
versionConstraint
- The parsed version constraint, may be null
.null
.Copyright © 2010–2018 The Apache Software Foundation. All rights reserved.