@NotThreadSafe public static final class ImmutableCatalogNode.Builder extends Object
ImmutableCatalogNode.
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 |
|---|---|
ImmutableCatalogNode |
build()
Builds a new
ImmutableCatalogNode. |
ImmutableCatalogNode.Builder |
from(CatalogNode instance)
Fill a builder with attribute values from the provided
CatalogNode instance. |
ImmutableCatalogNode.Builder |
node(Node node)
Initializes the value for the
node attribute. |
ImmutableCatalogNode.Builder |
putAllServices(Map<String,? extends Service> entries)
Put all mappings from the specified map as entries to
services map. |
ImmutableCatalogNode.Builder |
putServices(Map.Entry<String,? extends Service> entry)
Put one entry to the
services map. |
ImmutableCatalogNode.Builder |
putServices(String key,
Service value)
Put one entry to the
services map. |
ImmutableCatalogNode.Builder |
services(Map<String,? extends Service> entries)
Sets or replaces all mappings from the specified map as entries for the
services map. |
public final ImmutableCatalogNode.Builder from(CatalogNode instance)
CatalogNode 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 ImmutableCatalogNode.Builder node(Node node)
node attribute.node - The value for nodethis builder for use in a chained invocationpublic final ImmutableCatalogNode.Builder putServices(String key, Service value)
services map.key - The key in the services mapvalue - The associated value in the services mapthis builder for use in a chained invocationpublic final ImmutableCatalogNode.Builder putServices(Map.Entry<String,? extends Service> entry)
services map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutableCatalogNode.Builder services(Map<String,? extends Service> entries)
services map. Nulls are not permittedentries - The entries that will be added to the services mapthis builder for use in a chained invocationpublic final ImmutableCatalogNode.Builder putAllServices(Map<String,? extends Service> entries)
services map. Nulls are not permittedentries - The entries that will be added to the services mapthis builder for use in a chained invocationpublic ImmutableCatalogNode build()
ImmutableCatalogNode.IllegalStateException - if any required attributes are missingCopyright © 2018. All rights reserved.