package com.google.sps.data;

import java.util.ArrayList;
import java.util.List;

// Class representing a User
public class User {
  private String id;
  private String email;
  private String username;
  private ArrayList<Long> planner;
  private ArrayList<Long> cookbook;
  private ArrayList<Long> userRecipes;
  // shopping list will not be implented until after MVP
  private ArrayList<String> shoppingList;

  public User(String id, String email, String username) {
    this.id = id;
    this.email = email;
    this.username = username;
    planner = new ArrayList<Long>();
    cookbook = new ArrayList<Long>();
    userRecipes = new ArrayList<Long>();
  }

  public User(String id, String email, String username, ArrayList<Long> planner, ArrayList<Long> cookbook, ArrayList<Long> userRecipes) {
    this.id = id;
    this.email = email;
    this.username = username;
    this.cookbook = cookbook;
    this.planner = planner;
    this.userRecipes = userRecipes;
  }

  public void setID(String id) {
    this.id = id;
  }

  public boolean equalIDs(String id) {
    if (this.id.equals(id)) {
      return true;
    }
    return false;
  }

  public void addRecipeToPlanner(long id) {
    planner.add(id);
  }

  public void addRecipeToCookbook(long id) {
    cookbook.add(id);
  }

  public void addRecipeToUserRecipes(long id) {
    userRecipes.add(id);
  }
}

@@ -670,357 +670,265 @@
 lic 
-User(String id, String email, String username, ArrayList%3CLong%3E planner, ArrayList%3CLong%3E cookbook, ArrayList%3CLong%3E userRecipes) %7B%0A    this.id = id;%0A    this.email = email;%0A    this.username = username;%0A    this.cookbook = cookbook;%0A    this.planner = planner;%0A    this.userRecipes = userRecipes;%0A  %7D%0A%0A  public void setID(String id) %7B%0A    this.id = 
+void setID(String id) %7B%0A    this.id = id;%0A  %7D%0A%0A  public boolean equalIDs(String id) %7B%0A    return this.id.equals(id);%0A  %7D%0A%0A  public void addRecipeToPlanner(long id) %7B%0A    planner.add(id);%0A  %7D%0A%0A  public void addRecipeToCookbook(long id) %7B%0A    cookbook.add(
 id
+)
 ;%0A  
@@ -943,109 +943,70 @@
 lic 
-boolean equalIDs(String id) %7B%0A    if (this.id.equals(id)) %7B%0A      return true;%0A    %7D%0A    return false
+void addRecipeToUserRecipes(long id) %7B%0A    userRecipes.add(id)
 ;%0A  
@@ -1018,35 +1018,40 @@
 public void 
-add
+remove
 Recipe
-To
+From
 Planner(long
@@ -1061,39 +1061,52 @@
 ) %7B%0A    planner.
-add
+remove(new Long
 (id)
+)
 ;%0A  %7D%0A%0A  public 
@@ -1106,35 +1106,40 @@
 public void 
-add
+remove
 Recipe
-To
+From
 Cookbook(lon
@@ -1151,39 +1151,53 @@
  %7B%0A    cookbook.
-add
+remove(new Long 
 (id)
+)
 ;%0A  %7D%0A%0A  public 
@@ -1197,35 +1197,40 @@
 public void 
-add
+remove
 Recipe
-To
+From
 UserRecipes(
@@ -1252,27 +1252,41 @@
 userRecipes.
-add
+remove(new Long 
 (id)
+)
 ;%0A  %7D%0A%7D%0A

Update User.java