I have a list which hold all my data: `setData` List> setData = new ArrayList>(); Map set; and the value are added like this (this happens in a loop, when it is iterating through a cursor): set = new HashMap(); set.put("value", value); set.put("day", day); setData.add(set); The Array is sorted **afterwards**, from the lowest value for 'day' to the highest value for 'day'. **My question:** I want to combine all 'values' with the same 'day', the 'value' need to be added or subtracted, that my final Array only holds one value for each day. Seems like a complex structure. Did you consider using SQLite?