类 FormatterLineAggregator<T>
- java.lang.Object
- org.springframework.batch.item.file.transform.ExtractorLineAggregator<T>
- org.springframework.batch.item.file.transform.FormatterLineAggregator<T>
- 所有已实现的接口:
LineAggregator<T>
public class FormatterLineAggregator<T> extends ExtractorLineAggregator<T>
ALineAggregator
implementation which produces a String by aggregating the provided item via theFormatter
syntax.- 作者:
- Dave Syer
- 另请参阅:
Formatter
构造器概要
构造器 构造器 说明 FormatterLineAggregator()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.从类继承的方法 org.springframework.batch.item.file.transform.ExtractorLineAggregator
aggregate, setFieldExtractor
构造器详细资料
FormatterLineAggregator
public FormatterLineAggregator()
方法详细资料
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.- 参数:
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.- 参数:
maximumLength
- the maximum length to set
setFormat
public void setFormat(java.lang.String format)
Set the format string used to aggregate items.- 参数:
format
-String
containing the format to use.- 另请参阅:
Formatter
setLocale
public void setLocale(java.util.Locale locale)
Public setter for the locale.- 参数:
locale
- the locale to set
doAggregate
protected java.lang.String doAggregate(java.lang.Object[] fields)
从类复制的说明:ExtractorLineAggregator
Aggregate provided fields into single String.- 指定者:
doAggregate
在类中ExtractorLineAggregator<T>
- 参数:
fields
- An array of the fields that must be aggregated- 返回:
- aggregated string