|
@@ -56,10 +56,13 @@ public class OutPutObject {
|
56
|
56
|
temp.getPrices().addNewPrice(i.getPrice());
|
57
|
57
|
itemCounters.put(i.getName(), temp);
|
58
|
58
|
} else {
|
59
|
|
-
|
60
|
59
|
temp = itemCounters.get(i.getName());
|
61
|
|
- temp.getPrices().addNewPrice(i.getPrice());
|
62
|
|
- temp.setCount(temp.getCount()+1);
|
|
60
|
+ if (!temp.getPrices().getPrices().keySet().contains(i.getPrice())) {
|
|
61
|
+ temp.getPrices().addNewPrice(i.getPrice());
|
|
62
|
+ } else {
|
|
63
|
+ temp.getPrices().IncrementPriceCounter(i.getPrice());
|
|
64
|
+ }
|
|
65
|
+ temp.setCount(temp.getCount() + 1);
|
63
|
66
|
itemCounters.put(i.getName(),temp);
|
64
|
67
|
}
|
65
|
68
|
}
|