org.springframework.batch.item.file.builder

## Class FlatFileItemWriterBuilder.FormattedBuilder<T>

- java.lang.Object
- - org.springframework.batch.item.file.builder.FlatFileItemWriterBuilder.FormattedBuilder<T>

- Type Parameters:
    `T` - the type of the parent `FlatFileItemWriterBuilder`
  Enclosing class:
    FlatFileItemWriterBuilder<T>

      public static class FlatFileItemWriterBuilder.FormattedBuilder<T>
      extends java.lang.Object

  A builder for constructing a `FormatterLineAggregator`.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `FormattedBuilder(FlatFileItemWriterBuilder<T> parent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FormatterLineAggregator<T>` | `build()`
    `FlatFileItemWriterBuilder<T>` | `fieldExtractor(FieldExtractor<T> fieldExtractor)` Set the `FieldExtractor` to use to extract fields from each item.
    `FlatFileItemWriterBuilder.FormattedBuilder<T>` | `format(java.lang.String format)` Set the format string used to aggregate items
    `FlatFileItemWriterBuilder.FormattedBuilder<T>` | `locale(java.util.Locale locale)` Set the locale.
    `FlatFileItemWriterBuilder.FormattedBuilder<T>` | `maximumLength(int maximumLength)` Set the maximum length of the formatted string.
    `FlatFileItemWriterBuilder.FormattedBuilder<T>` | `minimumLength(int minimumLength)` Set the minimum length of the formatted string.
    `FlatFileItemWriterBuilder<T>` | `names(java.lang.String... names)` Names of each of the fields within the fields that are returned in the order they occur within the formatted file.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FormattedBuilder

          protected FormattedBuilder(FlatFileItemWriterBuilder<T> parent)

  - ### Method Detail

    - #### format

          public FlatFileItemWriterBuilder.FormattedBuilder<T> format(java.lang.String format)

      Set the format string used to aggregate items
      Parameters:
        `format` - used to aggregate items
      Returns:
        The instance of the builder for chaining.

    - #### locale

          public FlatFileItemWriterBuilder.FormattedBuilder<T> locale(java.util.Locale locale)

      Set the locale.
      Parameters:
        `locale` - to use
      Returns:
        The instance of the builder for chaining.

    - #### minimumLength

          public FlatFileItemWriterBuilder.FormattedBuilder<T> minimumLength(int minimumLength)

      Set the minimum length of the formatted string. If this is not set the default is to allow any length.
      Parameters:
        `minimumLength` - of the formatted string
      Returns:
        The instance of the builder for chaining.

    - #### maximumLength

          public FlatFileItemWriterBuilder.FormattedBuilder<T> maximumLength(int maximumLength)

      Set the maximum length of the formatted string. If this is not set the default is to allow any length.
      Parameters:
        `maximumLength` - of the formatted string
      Returns:
        The instance of the builder for chaining.

    - #### fieldExtractor

          public FlatFileItemWriterBuilder<T> fieldExtractor(FieldExtractor<T> fieldExtractor)

      Set the `FieldExtractor` to use to extract fields from each item.
      Parameters:
        `fieldExtractor` - to use to extract fields from each item
      Returns:
        The current instance of the builder

    - #### names

          public FlatFileItemWriterBuilder<T> names(java.lang.String... names)

      Names of each of the fields within the fields that are returned in the order they occur within the formatted file. These names will be used to create a `BeanWrapperFieldExtractor` only if no explicit field extractor is set via `fieldExtractor(FieldExtractor)`.
      Parameters:
        `names` - names of each field
      Returns:
        The parent `FlatFileItemWriterBuilder`
      See Also:
        `BeanWrapperFieldExtractor.setNames(String[])`

    - #### build

          public FormatterLineAggregator<T> build()