public static class ImmutableCamelCatalogSpec.Builder extends Object
ImmutableCamelCatalogSpec.
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.
| Constructor and Description |
|---|
Builder()
Creates a builder for
ImmutableCamelCatalogSpec instances. |
| Modifier and Type | Method and Description |
|---|---|
CamelCatalogSpec.Builder |
artifacts(SortedMap<String,CamelArtifact> artifacts)
Initializes the value for the
artifacts attribute. |
ImmutableCamelCatalogSpec |
build()
Builds a new
ImmutableCamelCatalogSpec. |
CamelCatalogSpec.Builder |
from(CamelCatalogSpec instance)
Fill a builder with attribute values from the provided
CamelCatalogSpec instance. |
CamelCatalogSpec.Builder |
runtimeVersion(String runtimeVersion)
Initializes the value for the
runtimeVersion attribute. |
CamelCatalogSpec.Builder |
version(String version)
Initializes the value for the
version attribute. |
public Builder()
ImmutableCamelCatalogSpec instances.
new CamelCatalogSpec.Builder()
.version(String) // required version
.runtimeVersion(String) // required runtimeVersion
.artifacts(SortedMap<String, org.apache.camel.k.tooling.maven.model.CamelArtifact>) // optional artifacts
.build();
public final CamelCatalogSpec.Builder from(CamelCatalogSpec instance)
CamelCatalogSpec instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final CamelCatalogSpec.Builder version(String version)
version attribute.version - The value for versionthis builder for use in a chained invocationpublic final CamelCatalogSpec.Builder runtimeVersion(String runtimeVersion)
runtimeVersion attribute.runtimeVersion - The value for runtimeVersionthis builder for use in a chained invocationpublic final CamelCatalogSpec.Builder artifacts(SortedMap<String,CamelArtifact> artifacts)
artifacts attribute.
If not set, this attribute will have a default value as returned by the initializer of artifacts.
artifacts - The value for artifactsthis builder for use in a chained invocationpublic ImmutableCamelCatalogSpec build()
ImmutableCamelCatalogSpec.IllegalStateException - if any required attributes are missingCopyright © 2019 The Apache Software Foundation. All rights reserved.