I have two Lists and they have same size. I would like to iterate over both of them simultaneously and override values from one stream on another stream.
For example I have two lists ListA and ListB with some data and they can be compared by id and I would like to get as a result like below:
List<SomeObject> listA;
List<AnotherObject> listB;
listA: {
[id=111;
name='AAA';
age=65],
[id=222;
name='BBB';
age=11],
}
listB: {
[id=111;
name='';
age=null],
[id=222;
name='';
age=null],
}
result:{
[id=111;
name='AAA';
age=65],
[id=222;
name='BBB';
age=11],
}
They have some other properties of course which are different and should stay as it is. So I need to override just two of them