class FormatterLineAggregator<T> extends ExtractorLineAggregator<T> {

	private String format;

	private Locale locale = Locale.getDefault();

	private int maximumLength = 0;

	private int minimumLength = 0;

	/**
	 * Public setter for the minimum length of the formatted string. If this is not set
	 * the default is to allow any length.
	 * @param minimumLength the minimum length to set
	 */
	public void setMinimumLength(int minimumLength) {
		this.minimumLength = minimumLength;
	}

	/**
	 * Public setter for the maximum length of the formatted string. If this is not set
	 * the default is to allow any length.
	 * @param maximumLength the maximum length to set
	 */
	public void setMaximumLength(int maximumLength) {
		this.maximumLength = maximumLength;
	}

	/**
	 * Set the format string used to aggregate items.
	 * @param format {@link String} containing the format to use.
	 *
	 * @see Formatter
	 */
	public void setFormat(String format) {
		this.format = format;
	}

	/**
	 * Public setter for the locale.
	 * @param locale the locale to set
	 */
	public void setLocale(Locale locale) {
		this.locale = locale;
	}

	@Override
	protected String doAggregate(Object[] fields) {<FILL_FUNCTION_BODY>}

}


		Assert.notNull(format, "A format is required");

		String value = String.format(locale, format, fields);

		if (maximumLength > 0) {
			Assert.state(value.length() <= maximumLength, String
				.format("String overflowed in formatter -" + " longer than %d characters: [%s", maximumLength, value));
		}

		if (minimumLength > 0) {
			Assert.state(value.length() >= minimumLength, String.format(
					"String underflowed in formatter -" + " shorter than %d characters: [%s", minimumLength, value));
		}

		return value;
	
<methods>public non-sealed void <init>() ,public java.lang.String aggregate(T) ,public void setFieldExtractor(FieldExtractor<T>) <variables>private FieldExtractor<T> fieldExtractor