Search This Blog

Wednesday, January 15, 2020

Java Stream API - Get Max value from two list.

Double max = volist.stream().map(vo -> modellist .stream()
  .collect(Collectors.averagingDouble(model ->
  jarowinklerdistance.apply(model.getCity(), vo.getCity())))
  ).max(Double::compare).get();
 
  System.out.println(max);

No comments:

Hit Counter


View My Stats