case 0:
return null;
case 1:
String name = nameExtractor.apply(nodes.get(0));
DataElementTemplate de = new DefaultDataElementTemplate(name);
return new DeTemplateTransferable(de);
default:
Object[] names = Arrays2.transform(nodes.toArray(), nameExtractor);
String s = StringUtils.join(names, System.getProperty("line.separator"));
return new StringSelection(s);
}