package net.sf.kerner.utils.collections.list.impl;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import net.sf.kerner.utils.collections.CollectionTransformer;

public class ToStringListTransformer implements CollectionTransformer<Object, String> {

	public List<String> transformCollection(
			Collection<? extends Object> element) {
		final List<String> result = new ArrayList<String>();
		for (Object o : element) {
			result.add(o.toString());
		}
		return result;
	}
}

@@ -187,16 +187,73 @@
 sformer;
+%0Aimport net.sf.kerner.utils.collections.ToStringStrategy;
 %0A%0Apublic
@@ -333,16 +333,406 @@
 tring%3E %7B
+%0A%09%0A%09public final static ToStringStrategy%3CObject%3E DEFAULT_TO_STRING_STRATEGY = new ToStringStrategy%3CObject%3E() %7B%0A%0A%09%09public String visit(Object element) %7B%0A%09%09%09return element.toString();%0A%09%09%7D%0A%09%7D;%0A%09%0A%09private final ToStringStrategy%3CObject%3E s;%0A%09%0A%09public ToStringListTransformer() %7B%0A%09%09s = DEFAULT_TO_STRING_STRATEGY;%0A%09%7D%0A%09%0A%09public ToStringListTransformer(ToStringStrategy%3CObject%3E s) %7B%0A%09%09this.s = s;%0A%09%7D
 %0A%0A%09publi
@@ -912,19 +912,17 @@
 add(
-o.toString(
+s.visit(o
 ));%0A

Add optional ToStringStrategy usage.