I have e.g. following Lists:
List<tst> listx; // tst object has properties: year, A, B, C, D year A B C D ------------ 2013 5 0 0 0 // list1 2014 3 0 0 0 2013 0 8 0 0 // list2 2014 0 1 0 0 2013 0 0 2 0 // list3 2014 0 0 3 0 2013 0 0 0 1 // list4 2014 0 0 0 5 if I use addAll method, the listTotal will be:
year A B C D ------------ 2013 5 0 0 0 // listTotal 2014 3 0 0 0 2013 0 8 0 0 2014 0 1 0 0 2013 0 0 2 0 2014 0 0 3 0 2013 0 0 0 1 2014 0 0 0 5 How to merge them to the listRequired which would be like this?
year A B C D ------------ 2013 5 8 2 1 // listRequired 2014 3 1 3 5