Class ImmutableRandomDataConfig.Builder

  • Enclosing class:
    ImmutableRandomDataConfig

    @NotThreadSafe
    public static final class ImmutableRandomDataConfig.Builder
    extends java.lang.Object
    Builds instances of type 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.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableRandomDataConfig.Builder from​(RandomDataConfig instance)
        Fill a builder with attribute values from the provided RandomDataConfig instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • fromBirthday

        @CanIgnoreReturnValue
        public final ImmutableRandomDataConfig.Builder fromBirthday​(java.time.ZonedDateTime fromBirthday)
        Initializes the value for the fromBirthday attribute.

        If not set, this attribute will have a default value as returned by the initializer of fromBirthday.

        Parameters:
        fromBirthday - The value for fromBirthday
        Returns:
        this builder for use in a chained invocation
      • random

        @CanIgnoreReturnValue
        public final ImmutableRandomDataConfig.Builder random​(java.util.Random random)
        Initializes the value for the random attribute.

        If not set, this attribute will have a default value as returned by the initializer of random.

        Parameters:
        random - The value for random
        Returns:
        this builder for use in a chained invocation
      • toBirthday

        @CanIgnoreReturnValue
        public final ImmutableRandomDataConfig.Builder toBirthday​(java.time.ZonedDateTime toBirthday)
        Initializes the value for the toBirthday attribute.

        If not set, this attribute will have a default value as returned by the initializer of toBirthday.

        Parameters:
        toBirthday - The value for toBirthday
        Returns:
        this builder for use in a chained invocation