@Override
	public Object[] extract(Tuple item) {
		List<Object> extractedFields = new ArrayList<Object>(item.getFieldCount());

		if (CollectionUtils.isEmpty(names)) {
			for (int i = 0; i < item.getFieldCount(); i++) {
				extractedFields.add(item.getValue(i));
			}
		}
		else {
			for (String fieldName : names) {
				extractedFields.add(item.getValue(fieldName));
			}
		}
		return extractedFields.toArray();
	}
Implementation of the {@link FieldExtractor} that extracts fields from a {@link Tuple}. There are two options for the
extraction:

<ul>
<li>Names - The fields will be extracted from the item in the order they are specified via the names in the provided
List.</li>
<li>Order - Since Tuple implementations are ordered, if a list of names is not provided, all fields in the Tuple will
be extracted in order.
</ul>

@author Michael Minella
spring-xd-tuple/src/main/java/org/springframework/xd/tuple/batch/TupleFieldExtractor.java