Inventory calculator in Java 8