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 Details

    • getExceptions

      @Nonnull List<Exception> getExceptions()
      Gets the exceptions that occurred while resolving the version range.
      Returns:
      The list of exceptions that occurred during resolution, never null
    • getVersions

      @Nonnull List<Version> 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

      @Nonnull default Optional<Version> 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

      @Nonnull default Optional<Version> 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

      @Nonnull Optional<Repository> getRepository(Version version)
      Gets the repository from which the specified version was resolved.
      Parameters:
      version - The version whose source repository should be retrieved, must not be null
      Returns:
      An Optional containing the repository from which the version was resolved, or empty Optional if the repository is unknown