@NotThreadSafe
public static final class ImmutableRandomDataConfig.Builder
extends java.lang.Object
ImmutableRandomDataConfig.
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 |
|---|---|
ImmutableRandomDataConfig |
build()
Builds a new
ImmutableRandomDataConfig. |
ImmutableRandomDataConfig.Builder |
from(RandomDataConfig instance)
Fill a builder with attribute values from the provided
RandomDataConfig instance. |
ImmutableRandomDataConfig.Builder |
fromBirthday(java.time.ZonedDateTime fromBirthday)
Initializes the value for the
fromBirthday attribute. |
ImmutableRandomDataConfig.Builder |
random(java.util.Random random)
Initializes the value for the
random attribute. |
ImmutableRandomDataConfig.Builder |
toBirthday(java.time.ZonedDateTime toBirthday)
Initializes the value for the
toBirthday attribute. |
@CanIgnoreReturnValue public final ImmutableRandomDataConfig.Builder from(RandomDataConfig instance)
RandomDataConfig 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 invocation@CanIgnoreReturnValue public final ImmutableRandomDataConfig.Builder fromBirthday(java.time.ZonedDateTime fromBirthday)
fromBirthday attribute.
If not set, this attribute will have a default value as returned by the initializer of fromBirthday.
fromBirthday - The value for fromBirthdaythis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableRandomDataConfig.Builder random(java.util.Random random)
random attribute.
If not set, this attribute will have a default value as returned by the initializer of random.
random - The value for randomthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableRandomDataConfig.Builder toBirthday(java.time.ZonedDateTime toBirthday)
toBirthday attribute.
If not set, this attribute will have a default value as returned by the initializer of toBirthday.
toBirthday - The value for toBirthdaythis builder for use in a chained invocationpublic ImmutableRandomDataConfig build()
ImmutableRandomDataConfig.java.lang.IllegalStateException - if any required attributes are missing