package com.iluwatar; import java.util.ArrayList; import java.util.List; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class Inventory { private int inventorySize; private List items; private Lock lock = new ReentrantLock(); public Inventory(int inventorySize) { this.inventorySize = inventorySize; this.items = new ArrayList(inventorySize); } public boolean addItem(Item item){ if(items.size()