@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        ShoppingListItem other = (ShoppingListItem) obj;
        if (amount == null) {
            if (other.amount != null) {
                return false;
            }
        }
        else if (!amount.equals(other.amount)) {
            return false;
        }
        if (itemName == null) {
            if (other.itemName != null) {
                return false;
            }
        }
        else if (!itemName.equals(other.itemName)) {
            return false;
        }
        return true;
    }