Java 8 -Flatten -Karte mit ListenJava

Java-Forum
Anonymous
 Java 8 -Flatten -Karte mit Listen

Post by Anonymous »

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):
});
});

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post