bookmark

Groovy Goodness: Java 8 Stream Enhancements - Messages from mrhaki


Description

def sample = ['Groovy', 'Gradle', 'Grails', 'Spock'] as String[] def result = sample.stream() // Use stream() on array objects .filter { s -> s.startsWith('Gr') } .map { s -> s.toUpperCase() } .toList() // toList() added to Stream by Groovy

Preview

Tags

Users

  • @jil

Comments and Reviews