If you are in groovy , there is no need to import anything, just do:
list = ["thing 1", "thing 2", "thing 3"] println list.collect { i -> "$i" }.join(', ')
item 1, item 2, item 3
The same thing happens with the collection of cards:
map = [I:"James Bond", love:"rock N roll", id:"007"] println map.collect { k,v -> "$k = $v" }.join('\n')
I = James Bond
love = rock n roll
id = 007
Noam manos
source share