Java 8 -Flatten -Karte mit Listen

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Java 8 -Flatten -Karte mit Listen

by Anonymous » 11 Jul 2025, 17:56

Ich habe eine Struktur wie Karte

Code: Select all


[code]TypeProcessor p=new TypeProcessor.instance();

//Apply this function to the key and each map from the list
// The collect the Result returned in a list.
Result process(String key, Map dataPoints);
< /code>

List list = new ArrayList();
map.forEach(key,value) -> {
value.forEach(innerVal -> {
Result r=p.process(key,innerVal);
list.add(r):
});
});

Top