Created
July 1, 2011 19:49
-
-
Save vsoued/1059265 to your computer and use it in GitHub Desktop.
Basic user class example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.brandeis.vogueable; | |
import java.util.ArrayList; | |
import android.content.Context; | |
public class User { | |
private String name; | |
private ArrayList<Item> wishlist; | |
private TasteManager mytaste; | |
private Context con; | |
public User(String name, Context con){ | |
this.name = name; | |
this.con = con; | |
wishlist = new ArrayList<Item>(); | |
mytaste = new TasteManager(con); | |
} | |
public String getName(){ | |
return name; | |
} | |
public Context getContext(){ | |
return con; | |
} | |
public ArrayList<Item> getWishlist(){ | |
return wishlist; | |
} | |
public void addToWishlist(Item item){ | |
wishlist.add(item); | |
} | |
public void removeFromWishlist(Item item){ | |
wishlist.remove(item); | |
} | |
public TasteManager getTasteManager(){ | |
return mytaste; | |
} | |
public Item getItemFromWishlist(int i){ | |
return wishlist.get(i); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment