@NotThreadSafe
public static final class ImmutableAddress.Builder
extends java.lang.Object
ImmutableAddress.
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 |
|---|---|
ImmutableAddress |
build()
Builds a new
ImmutableAddress. |
ImmutableAddress.Builder |
city(java.lang.String city)
Initializes the value for the
city attribute. |
ImmutableAddress.Builder |
created(java.time.ZonedDateTime created)
Initializes the value for the
created attribute. |
ImmutableAddress.Builder |
from(AbstractModel instance)
Fill a builder with attribute values from the provided
com.arakelian.faker.model.AbstractModel instance. |
ImmutableAddress.Builder |
from(Address instance)
Fill a builder with attribute values from the provided
com.arakelian.faker.model.Address instance. |
ImmutableAddress.Builder |
from(com.arakelian.store.feature.HasId instance)
Fill a builder with attribute values from the provided
com.arakelian.store.feature.HasId instance. |
ImmutableAddress.Builder |
from(com.arakelian.store.feature.HasTimestamp instance)
Fill a builder with attribute values from the provided
com.arakelian.store.feature.HasTimestamp instance. |
ImmutableAddress.Builder |
id(java.lang.String id)
Initializes the value for the
id attribute. |
ImmutableAddress.Builder |
postalCode(java.lang.String postalCode)
Initializes the value for the
postalCode attribute. |
ImmutableAddress.Builder |
state(java.lang.String state)
Initializes the value for the
state attribute. |
ImmutableAddress.Builder |
street(java.lang.String street)
Initializes the value for the
street attribute. |
ImmutableAddress.Builder |
updated(java.time.ZonedDateTime updated)
Initializes the value for the
updated attribute. |
@CanIgnoreReturnValue public final ImmutableAddress.Builder from(com.arakelian.store.feature.HasId instance)
com.arakelian.store.feature.HasId instance.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder from(AbstractModel instance)
com.arakelian.faker.model.AbstractModel instance.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder from(com.arakelian.store.feature.HasTimestamp instance)
com.arakelian.store.feature.HasTimestamp instance.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder from(Address instance)
com.arakelian.faker.model.Address instance.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder city(java.lang.String city)
city attribute.city - The value for citythis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder postalCode(java.lang.String postalCode)
postalCode attribute.postalCode - The value for postalCodethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder state(java.lang.String state)
state attribute.state - The value for statethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder street(java.lang.String street)
street attribute.street - The value for streetthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder created(java.time.ZonedDateTime created)
created attribute.
If not set, this attribute will have a default value as returned by the initializer of created.
created - The value for createdthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder id(java.lang.String id)
id attribute.
If not set, this attribute will have a default value as returned by the initializer of id.
id - The value for idthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableAddress.Builder updated(java.time.ZonedDateTime updated)
updated attribute.
If not set, this attribute will have a default value as returned by the initializer of updated.
updated - The value for updatedthis builder for use in a chained invocationpublic ImmutableAddress build()
ImmutableAddress.java.lang.IllegalStateException - if any required attributes are missing