public abstract class ExtractorLineAggregator<T> extends Object implements LineAggregator<T>
LineAggregator implementation that utilizes a
FieldExtractor to convert the incoming object to an array of its
parts. Extending classes must decide how those parts will be aggregated
together.| Constructor and Description |
|---|
ExtractorLineAggregator() |
| Modifier and Type | Method and Description |
|---|---|
String |
aggregate(T item)
Extract fields from the given item using the
FieldExtractor and
then aggregate them. |
protected abstract String |
doAggregate(Object[] fields)
Aggregate provided fields into single String.
|
void |
setFieldExtractor(FieldExtractor<T> fieldExtractor)
Public setter for the field extractor responsible for splitting an input
object up into an array of objects.
|
public void setFieldExtractor(FieldExtractor<T> fieldExtractor)
PassThroughFieldExtractor.fieldExtractor - The field extractor to setpublic String aggregate(T item)
FieldExtractor and
then aggregate them. Any null field returned by the extractor will be
replaced by an empty String. Null items are not allowed.aggregate in interface LineAggregator<T>item - values to be convertedLineAggregator.aggregate(java.lang.Object)Copyright © 2014. All rights reserved.