Package org.apache.maven.api.services
Interface VersionRangeResolverResult
- All Superinterfaces:
Result<VersionRangeResolverRequest>
@Experimental
public interface VersionRangeResolverResult
extends Result<VersionRangeResolverRequest>
Represents the result of a version range resolution request. This interface provides access to
information about resolved versions that match a version range constraint, including any exceptions
that occurred during resolution, the available versions, and their source repositories.
The versions returned by this interface are guaranteed to be in ascending order.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionGets the exceptions that occurred while resolving the version range.Gets the highest version matching the requested range.Gets the lowest version matching the requested range.getRepository
(Version version) Gets the repository from which the specified version was resolved.Gets the versions (in ascending order) that matched the requested range.Methods inherited from interface org.apache.maven.api.services.Result
getRequest
-
Method Details
-
getExceptions
Gets the exceptions that occurred while resolving the version range.- Returns:
- The list of exceptions that occurred during resolution, never
null
-
getVersions
Gets the versions (in ascending order) that matched the requested range.- Returns:
- The list of matching versions, never
null
. An empty list indicates no versions matched the requested range.
-
getLowestVersion
Gets the lowest version matching the requested range.- Returns:
- An Optional containing the lowest matching version, or empty Optional if no versions matched the requested range
-
getHighestVersion
Gets the highest version matching the requested range.- Returns:
- An Optional containing the highest matching version, or empty Optional if no versions matched the requested range
-
getRepository
Gets the repository from which the specified version was resolved.- Parameters:
version
- The version whose source repository should be retrieved, must not benull
- Returns:
- An Optional containing the repository from which the version was resolved, or empty Optional if the repository is unknown
-