Created
July 31, 2013 17:19
-
-
Save azenla/6124080 to your computer and use it in GitHub Desktop.
:) Turns an ArrayList into a string, even though its not needed since Groovy has .join(' ')
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ArrayList.metaClass.asString = { -> | |
def builder = new StringBuilder() | |
delegate.eachWithIndex { object, index -> builder.append(object) ; if (!(index==delegate.size() - 1)) builder.append(' ')} | |
return builder.toString() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment