org.springframework.batch.item.file.transform

## Class RecursiveCollectionLineAggregator<T>

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

- All Implemented Interfaces:
    LineAggregator<java.util.Collection<T>>

      public class RecursiveCollectionLineAggregator<T>
      extends java.lang.Object
      implements LineAggregator<java.util.Collection<T>>

  An implementation of `LineAggregator` that concatenates a collection of items of a common type with the system line separator.
  Author:
    Dave Syer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RecursiveCollectionLineAggregator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `aggregate(java.util.Collection<T> items)` Create a string from the value provided.
    `void` | `setDelegate(LineAggregator<T> delegate)` Public setter for the `LineAggregator` to use on single items, that are not Strings.

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

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

- - ### Constructor Detail

    - #### RecursiveCollectionLineAggregator

          public RecursiveCollectionLineAggregator()

  - ### Method Detail

    - #### setDelegate

          public void setDelegate(LineAggregator<T> delegate)

      Public setter for the `LineAggregator` to use on single items, that are not Strings. This can be used to strategise the conversion of collection and array elements to a String.
      Parameters:
        `delegate` - the line aggregator to set. Defaults to a pass through.

    - #### aggregate

          public java.lang.String aggregate(java.util.Collection<T> items)

      Description copied from interface: `LineAggregator`
      Create a string from the value provided.
      Specified by:
        `aggregate` in interface `LineAggregator<java.util.Collection<T>>`
      Parameters:
        `items` - values to be converted
      Returns:
        string