Is there a XXXUtils
where I can do
String s = XXXUtils.join(aList, "name", ",");
where "name"
is a JavaBeans property from the object in the aList
.
I found only StringUtils
having join
method, but it only transforms a List<String>
into a separated String
.
Something like
StringUtils.join(BeanUtils.getArrayProperty(aList, "name"), ",")
that's fast and worths using. The BeanUtils throws 2 checked exceptions so I don't like it.