Skip to content

Instantly share code, notes, and snippets.

@benek
Created September 5, 2012 04:47
Show Gist options
  • Save benek/3630648 to your computer and use it in GitHub Desktop.
Save benek/3630648 to your computer and use it in GitHub Desktop.
toString() que devuelve los valores de todas las propiedades de una clase Groovy
@Override
public String toString() {
def s = new StringBuilder()
this.properties.each {
s.append("$it.key: $it.value\n")
}
return s.toString()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment