public static final class BuildpackData.Builder extends Object
BuildpackData.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
BuildpackData.Builder |
addAllBuildpacks(Iterable<String> elements)
Adds elements to
buildpacks list. |
BuildpackData |
build()
Builds a new
BuildpackData. |
BuildpackData.Builder |
buildpack(String... elements)
Adds elements to
buildpacks list. |
BuildpackData.Builder |
buildpack(String element)
Adds one element to
buildpacks list. |
BuildpackData.Builder |
buildpacks(Iterable<String> elements)
Sets or replaces all elements for
buildpacks list. |
BuildpackData.Builder |
from(BuildpackData instance)
Fill a builder with attribute values from the provided
BuildpackData instance. |
BuildpackData.Builder |
stack(String stack)
Initializes the value for the
stack attribute. |
public final BuildpackData.Builder from(BuildpackData instance)
BuildpackData instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final BuildpackData.Builder buildpack(String element)
buildpacks list.element - A buildpacks elementthis builder for use in a chained invocationpublic final BuildpackData.Builder buildpack(String... elements)
buildpacks list.elements - An array of buildpacks elementsthis builder for use in a chained invocationpublic final BuildpackData.Builder buildpacks(Iterable<String> elements)
buildpacks list.elements - An iterable of buildpacks elementsthis builder for use in a chained invocationpublic final BuildpackData.Builder addAllBuildpacks(Iterable<String> elements)
buildpacks list.elements - An iterable of buildpacks elementsthis builder for use in a chained invocationpublic final BuildpackData.Builder stack(String stack)
stack attribute.stack - The value for stack (can be null)this builder for use in a chained invocationpublic BuildpackData build()
BuildpackData.IllegalStateException - if any required attributes are missingCopyright © 2017 Pivotal Software, Inc.. All rights reserved.