public void changeAmount(String productName, int amount) {
    if (amount == 0) {
      OrderLine toRemove = null;
      for (OrderLine line : this.myLines) {
        if (line.getProduct().getName().equalsIgnoreCase(productName)) {
          toRemove = line;
        }
      }
      if (toRemove != null) {
        this.myLines.remove(toRemove);
      }
      return;
    } else {
      for (OrderLine line : this.myLines) {
        if (line.getProduct().getName().equalsIgnoreCase(productName)) {
          line.setAmount(amount);
        }
      }
    }
  }