Class RecursiveCollectionLineAggregator<T>
java.lang.Object
org.springframework.batch.item.file.transform.RecursiveCollectionLineAggregator<T>
- All Implemented Interfaces:
LineAggregator<Collection<T>>
public class RecursiveCollectionLineAggregator<T>
extends Object
implements LineAggregator<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
-
Method Summary
Modifier and TypeMethodDescriptionaggregate
(Collection<T> items) Create a string from the value provided.void
setDelegate
(LineAggregator<T> delegate) Public setter for theLineAggregator
to use on single items, that are not Strings.
-
Constructor Details
-
RecursiveCollectionLineAggregator
public RecursiveCollectionLineAggregator()
-
-
Method Details
-
setDelegate
Public setter for theLineAggregator
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
Description copied from interface:LineAggregator
Create a string from the value provided.- Specified by:
aggregate
in interfaceLineAggregator<T>
- Parameters:
items
- values to be converted- Returns:
- string
-