1 /**
2 *
3 */
4 package org.springframework.batch.item.file.transform;
5
6 /**
7 * Factory interface for creating {@link FieldSet} instances.
8 *
9 * @author Dave Syer
10 *
11 */
12 public interface FieldSetFactory {
13
14 /**
15 * Create a FieldSet with named tokens. The token values can then be
16 * retrieved either by name or by column number.
17 * @param values the token values
18 * @param names the names of the tokens
19 * @see DefaultFieldSet#readString(String)
20 */
21 FieldSet create(String[] values, String[] names);
22
23 /**
24 * Create a FieldSet with anonymous tokens. They can only be retrieved by
25 * column number.
26 * @param values the token values
27 * @see FieldSet#readString(int)
28 */
29 FieldSet create(String[] values);
30
31 }