org.springframework.batch.item.file.transform

## Class FormatterLineAggregator<T>

- java.lang.Object
- - org.springframework.batch.item.file.transform.ExtractorLineAggregator<T>
  - - org.springframework.batch.item.file.transform.FormatterLineAggregator<T>

- All Implemented Interfaces:
    LineAggregator<T>

      public class FormatterLineAggregator<T>
      extends ExtractorLineAggregator<T>

  A `LineAggregator` implementation which produces a String by aggregating the provided item via the `Formatter` syntax.
  Author:
    Dave Syer
  See Also:
    `Formatter`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FormatterLineAggregator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.String` | `doAggregate(java.lang.Object[] fields)` Aggregate provided fields into single String.
    `void` | `setFormat(java.lang.String format)` Set the format string used to aggregate items.
    `void` | `setLocale(java.util.Locale locale)` Public setter for the locale.
    `void` | `setMaximumLength(int maximumLength)` Public setter for the maximum length of the formatted string.
    `void` | `setMinimumLength(int minimumLength)` Public setter for the minimum length of the formatted string.

    - ### Methods inherited from class org.springframework.batch.item.file.transform.ExtractorLineAggregator

      `aggregate, setFieldExtractor`

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

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

- - ### Constructor Detail

    - #### FormatterLineAggregator

          public FormatterLineAggregator()

  - ### Method Detail

    - #### setMinimumLength

          public void setMinimumLength(int minimumLength)

      Public setter for the minimum length of the formatted string. If this is not set the default is to allow any length.
      Parameters:
        `minimumLength` - the minimum length to set

    - #### setMaximumLength

          public void setMaximumLength(int maximumLength)

      Public setter for the maximum length of the formatted string. If this is not set the default is to allow any length.
      Parameters:
        `maximumLength` - the maximum length to set

    - #### setFormat

          public void setFormat(java.lang.String format)

      Set the format string used to aggregate items.
      Parameters:
        `format` - `String` containing the format to use.
      See Also:
        `Formatter`

    - #### setLocale

          public void setLocale(java.util.Locale locale)

      Public setter for the locale.
      Parameters:
        `locale` - the locale to set

    - #### doAggregate

          protected java.lang.String doAggregate(java.lang.Object[] fields)

      Description copied from class: `ExtractorLineAggregator`
      Aggregate provided fields into single String.
      Specified by:
        `doAggregate` in class `ExtractorLineAggregator<T>`
      Parameters:
        `fields` - An array of the fields that must be aggregated
      Returns:
        aggregated string