- 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PackageURLbuild()Builds the new PackageURL object.PackageURL.BuilderwithName(String name)Adds the package name.PackageURL.BuilderwithNamespace(String namespace)Adds the package namespace.PackageURL.BuilderwithQualifier(String key, String value)Adds a package qualifier.PackageURL.BuilderwithSubpath(String subpath)Adds the package subpath.PackageURL.BuilderwithType(String type)Adds the package URL type.PackageURL.BuilderwithVersion(String version)Adds the package version.
-
-
-
Method Detail
-
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:
PackageURL.name(),com.github.packageurl.PackageURL.StandardTypes
-
withNamespace
public PackageURL.Builder withNamespace(String namespace)
Adds the package namespace.- Parameters:
namespace- the package namespace- Returns:
- a reference to the builder
- See Also:
PackageURL.namespace()
-
withName
public PackageURL.Builder withName(String name)
Adds the package name.- Parameters:
name- the package name- Returns:
- a reference to the builder
- See Also:
PackageURL.name()
-
withVersion
public PackageURL.Builder withVersion(String version)
Adds the package version.- Parameters:
version- the package version- Returns:
- a reference to the builder
- See Also:
PackageURL.version()
-
withSubpath
public PackageURL.Builder withSubpath(String subpath)
Adds the package subpath.- Parameters:
subpath- the package subpath- Returns:
- a reference to the builder
- See Also:
PackageURL.subpath()
-
withQualifier
public PackageURL.Builder withQualifier(String key, String value)
Adds a package qualifier.- Parameters:
key- the package qualifier keyvalue- the package qualifier value- Returns:
- a reference to the builder
- See Also:
PackageURL.qualifiers()
-
build
public PackageURL build()
Builds the new PackageURL object.- Returns:
- the new PackageURL object
-
-