if (bucket >= inventoryLevelsArray.length) { inventoryLevelsArray = expandArray(inventoryLevelsArray);
if (bucket >= inventoryLevelsArray.length) { inventoryLevelsArray = expandArray(inventoryLevelsArray); } inventoryLevelsArray[bucket] = value;
  public void setLevel(int bucket, double value) {    if (bucket >= inventoryLevelsArray.length) {      inventoryLevelsArray = expandArray(inventoryLevelsArray);    }    inventoryLevelsArray[bucket] = value;  }