Код: Выделить всё
public ClassA {
String prop1;
List classBList;
}
public ClassB {
String prop2;
List indexList;
List valueList;
}
public ClassC{
String prop1;
String prop2;
Integer index;
Integer value;
}
Скажем, у меня есть объект класса A, classA
Код: Выделить всё
List flattenedList = classA.getClassBList().stream()
.flatMap(e->{
List tempList = new ArrayList();
for(int i=0;i
Подробнее здесь: [url]https://stackoverflow.com/questions/79793926/best-way-to-flatmap-before-sending-to-a-producer-stream-kafka[/url]
Мобильная версия