Interface PackageIdentity.Builder

  • Method Details

    • ecosystem

      PackageIdentity.Builder ecosystem(String ecosystem)

      The package ecosystem, such as npm or pypi.

      Parameters:
      ecosystem - The package ecosystem, such as npm or pypi.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • name

      The package name, as used in its ecosystem.

      Parameters:
      name - The package name, as used in its ecosystem.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • version

      PackageIdentity.Builder version(String version)

      Exact version. Mutually exclusive with versionRange, validated server-side.

      Parameters:
      version - Exact version. Mutually exclusive with versionRange, validated server-side.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • versionRange

      PackageIdentity.Builder versionRange(String versionRange)

      A version range as one or more comparisons separated by commas, such as >=1.0, <2.0. Each comparison is =, >, >=, <, or <= followed by a version in the ecosystem's own format. Ecosystem shorthands such as ^1.0 or ~=1.2 aren't accepted. Mutually exclusive with version.

      Parameters:
      versionRange - A version range as one or more comparisons separated by commas, such as >=1.0, <2.0 . Each comparison is =, >, >=, <, or <= followed by a version in the ecosystem's own format. Ecosystem shorthands such as ^1.0 or ~=1.2 aren't accepted. Mutually exclusive with version.
      Returns:
      Returns a reference to this object so that method calls can be chained together.