Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of stripped down notation for Groovy, compared to Java.
import org.apache.commons.lang.StringUtils
class CopyMatcher {
def triggerWord
def matches(product) {
product.productCopy.any { StringUtils.containsIgnoreCase it.copy, triggerWord }

This comment has been minimized.

Copy link
Owner Author

@jeantessier jeantessier commented Jun 27, 2014

Some advantages:

  • code blocks
  • optional parentheses
  • type-less fields
  • type-less parameters
  • default visibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment