@NotThreadSafe public static final class ImmutableEntity.Builder extends Object
ImmutableEntity.
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 |
|---|---|
ImmutableEntity |
build()
Builds a new
ImmutableEntity. |
ImmutableEntity.Builder |
description(String description)
Initializes the value for the
description attribute. |
ImmutableEntity.Builder |
entityIdentifier(String entityIdentifier)
Initializes the value for the
entityIdentifier attribute. |
ImmutableEntity.Builder |
from(Entity instance)
Fill a builder with attribute values from the provided
Entity instance. |
ImmutableEntity.Builder |
hasNestedEntities(boolean hasNestedEntities)
Initializes the value for the
hasNestedEntities attribute. |
ImmutableEntity.Builder |
label(String label)
Initializes the value for the
label attribute. |
public final ImmutableEntity.Builder from(Entity instance)
Entity 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 ImmutableEntity.Builder entityIdentifier(String entityIdentifier)
entityIdentifier attribute.entityIdentifier - The value for entityIdentifierthis builder for use in a chained invocationpublic final ImmutableEntity.Builder hasNestedEntities(boolean hasNestedEntities)
hasNestedEntities attribute.hasNestedEntities - The value for hasNestedEntitiesthis builder for use in a chained invocationpublic final ImmutableEntity.Builder label(@Nullable String label)
label attribute.label - The value for label (can be null)this builder for use in a chained invocationpublic final ImmutableEntity.Builder description(@Nullable String description)
description attribute.description - The value for description (can be null)this builder for use in a chained invocationpublic ImmutableEntity build()
ImmutableEntity.IllegalStateException - if any required attributes are missingCopyright © 2021–2022 Amazon Web Services. All rights reserved.