Is there a nice way to convert List<List<List<Integer>>> to List<List<List<String>>> w/o 3 nested loops? [closed]

  • A+
Category:Languages

Basically if I have some mapping bifunction is there a shortcut for this kind of operation (so I won't have to write 3 nested loops)?


List<List<List<String>>> collect = list             .stream()             .map(a -> a                     .stream()                     .map(b -> b                             .stream()                             .map(String::valueOf)                             .collect(Collectors.toList()))                     .collect(Collectors.toList()))             .collect(Collectors.toList()); 

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: