cedric
01/20/2017, 12:06 AMString from the passed object. With that in mind, I would create a function that receives this operation as parameter closure (T -> String). Then you invoke it either passing { it -> it.toString()} or {it -> it.getName() }.