void (String fruitName, int quantity) { Integer curQuantity = entry.get(fruitName); if (curQuantity != null) { entry.put(fruitName, curQuantity + quantity); } else { throw new IllegalArgumentException("Not found fruit with name: " + fruitName); } }