I\'ve just started looking at Java 8 and to try out lambdas I thought I\'d try to rewrite a very simple thing I wrote recently. I need to turn a Map of String to Column int
Keep it Simple and use Java 8:-
Map mapAccountGroup=CustomerDAO.getAccountGroupMapping(); Map mapH2ToBydAccountGroups = mapAccountGroup.entrySet().stream() .collect(Collectors.toMap(e->e.getValue().getH2AccountGroup(), e ->e.getValue()) );