Skip to content

Instantly share code, notes, and snippets.

@entzik
Created December 18, 2016 09:29
Show Gist options
  • Save entzik/33743cf5d0e19139c2d536bb0866515f to your computer and use it in GitHub Desktop.
Save entzik/33743cf5d0e19139c2d536bb0866515f to your computer and use it in GitHub Desktop.
ArrayList<DataItem> records;
.....
records.stream()
.map(Record::getMetric1)
.collect(Collectors.averagingDouble(d -> d))
.doubleValue()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment