Class PackageURL.Builder

java.lang.Object
org.praxislive.purl.PackageURL.Builder
Enclosing class:
PackageURL

public static final class PackageURL.Builder extends Object
A builder construct for Package-URL objects.
  • Method Details

    • withType

      public PackageURL.Builder withType(String type)
      Adds the package URL type.
      Parameters:
      type - the package type
      Returns:
      a reference to the builder
      See Also:
    • withNamespace

      public PackageURL.Builder withNamespace(String namespace)
      Adds the package namespace.
      Parameters:
      namespace - the package namespace
      Returns:
      a reference to the builder
      See Also:
    • withName

      public PackageURL.Builder withName(String name)
      Adds the package name.
      Parameters:
      name - the package name
      Returns:
      a reference to the builder
      See Also:
    • withVersion

      public PackageURL.Builder withVersion(String version)
      Adds the package version.
      Parameters:
      version - the package version
      Returns:
      a reference to the builder
      See Also:
    • withSubpath

      public PackageURL.Builder withSubpath(String subpath)
      Adds the package subpath.
      Parameters:
      subpath - the package subpath
      Returns:
      a reference to the builder
      See Also:
    • withQualifier

      public PackageURL.Builder withQualifier(String key, String value)
      Adds a package qualifier.
      Parameters:
      key - the package qualifier key
      value - the package qualifier value
      Returns:
      a reference to the builder
      See Also:
    • build

      public PackageURL build()
      Builds the new PackageURL object.
      Returns:
      the new PackageURL object