org.eclipse.aether.collection

## Interface VersionFilter.VersionFilterContext

- All Superinterfaces:
    Iterable<Version>
  Enclosing interface:
    VersionFilter

      public static interface VersionFilter.VersionFilterContext
      extends Iterable<Version>

  A context used during version filtering to hold relevant data.
  Restriction:
    This interface is not intended to be extended by clients.
  Restriction:
    This interface is not intended to be implemented by clients.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCount()` Gets the total number of available versions.
    `Dependency` | `getDependency()` Gets the dependency whose version range is being filtered.
    `List<RemoteRepository>` | `getRepositories()` Gets the remote repositories from which the versions were resolved.
    `ArtifactRepository` | `getRepository(Version version)` Gets the repository from which the specified version was resolved.
    `RepositorySystemSession` | `getSession()` Gets the repository system session during which the version filtering happens.
    `VersionConstraint` | `getVersionConstraint()` Gets the version constraint that was parsed from the dependency's version string.
    `Iterator<Version>` | `iterator()` Gets an iterator over the available versions of the dependency.

- - ### Method Detail

    - #### getSession

          RepositorySystemSession getSession()

      Gets the repository system session during which the version filtering happens.
      Returns:
        The repository system session, never `null`.

    - #### getDependency

          Dependency getDependency()

      Gets the dependency whose version range is being filtered.
      Returns:
        The dependency, never `null`.

    - #### getCount

          int getCount()

      Gets the total number of available versions. This count reflects any removals made during version filtering.
      Returns:
        The total number of available versions.

    - #### iterator

          Iterator<Version> iterator()

      Gets an iterator over the available versions of the dependency. The iterator returns versions in ascending order. Use `Iterator.remove()` to exclude a version from further consideration in the dependency graph.
      Specified by:
        `iterator` in interface `Iterable<Version>`
      Returns:
        The iterator of available versions, never `null`.

    - #### getVersionConstraint

          VersionConstraint getVersionConstraint()

      Gets the version constraint that was parsed from the dependency's version string.
      Returns:
        The parsed version constraint, never `null`.

    - #### getRepository

          ArtifactRepository 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:
        The repository from which the version was resolved or `null` if unknown.

    - #### getRepositories

          List<RemoteRepository> getRepositories()

      Gets the remote repositories from which the versions were resolved.
      Returns:
        The (read-only) list of repositories, never `null`.

Copyright © 2010-2014 The Eclipse Foundation. All Rights Reserved.