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(Map<String,? extends CamelArtifact> entries)
Sets or replaces all mappings from the specified map as entries for the
artifacts map. |
ImmutableCamelCatalogSpec |
build()
Builds a new
ImmutableCamelCatalogSpec. |
CamelCatalogSpec.Builder |
from(CamelCatalogSpec instance)
Fill a builder with attribute values from the provided
CamelCatalogSpec instance. |
CamelCatalogSpec.Builder |
loaders(Map<String,? extends CamelLoader> entries)
Sets or replaces all mappings from the specified map as entries for the
loaders map. |
CamelCatalogSpec.Builder |
putAllArtifacts(Map<String,? extends CamelArtifact> entries)
Put all mappings from the specified map as entries to
artifacts map. |
CamelCatalogSpec.Builder |
putAllLoaders(Map<String,? extends CamelLoader> entries)
Put all mappings from the specified map as entries to
loaders map. |
CamelCatalogSpec.Builder |
putArtifact(Map.Entry<String,? extends CamelArtifact> entry)
Put one entry to the
artifacts map. |
CamelCatalogSpec.Builder |
putArtifact(String key,
CamelArtifact value)
Put one entry to the
artifacts map. |
CamelCatalogSpec.Builder |
putLoader(Map.Entry<String,? extends CamelLoader> entry)
Put one entry to the
loaders map. |
CamelCatalogSpec.Builder |
putLoader(String key,
CamelLoader value)
Put one entry to the
loaders map. |
CamelCatalogSpec.Builder |
runtime(RuntimeSpec runtime)
Initializes the value for the
runtime attribute. |
public Builder()
ImmutableCamelCatalogSpec instances.
new CamelCatalogSpec.Builder()
.runtime(org.apache.camel.k.tooling.maven.model.crd.RuntimeSpec) // required runtime
.putArtifact|putAllArtifacts(String => org.apache.camel.k.tooling.maven.model.CamelArtifact) // artifacts mappings
.putLoader|putAllLoaders(String => org.apache.camel.k.tooling.maven.model.CamelLoader) // loaders mappings
.build();
@CanIgnoreReturnValue 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.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelCatalogSpec.Builder runtime(RuntimeSpec runtime)
runtime attribute.runtime - The value for runtimethis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelCatalogSpec.Builder putArtifact(String key, CamelArtifact value)
artifacts map.key - The key in the artifacts mapvalue - The associated value in the artifacts mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelCatalogSpec.Builder putArtifact(Map.Entry<String,? extends CamelArtifact> entry)
artifacts map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelCatalogSpec.Builder artifacts(Map<String,? extends CamelArtifact> entries)
artifacts map. Nulls are not permittedentries - The entries that will be added to the artifacts mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelCatalogSpec.Builder putAllArtifacts(Map<String,? extends CamelArtifact> entries)
artifacts map. Nulls are not permittedentries - The entries that will be added to the artifacts mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelCatalogSpec.Builder putLoader(String key, CamelLoader value)
loaders map.key - The key in the loaders mapvalue - The associated value in the loaders mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelCatalogSpec.Builder putLoader(Map.Entry<String,? extends CamelLoader> entry)
loaders map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelCatalogSpec.Builder loaders(Map<String,? extends CamelLoader> entries)
loaders map. Nulls are not permittedentries - The entries that will be added to the loaders mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelCatalogSpec.Builder putAllLoaders(Map<String,? extends CamelLoader> entries)
loaders map. Nulls are not permittedentries - The entries that will be added to the loaders mapthis builder for use in a chained invocationpublic ImmutableCamelCatalogSpec build()
ImmutableCamelCatalogSpec.IllegalStateException - if any required attributes are missingCopyright © 2020 The Apache Software Foundation. All rights reserved.