Back to project page TacoTool.
The source code is released under:
GNU General Public License
If you think the Android project TacoTool listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.tacotool; /*from w w w . j a v a 2s. com*/ import java.util.ArrayList; public class Taco { private String name; private ArrayList<String> ingredients; private boolean nameSet; public Taco(){ nameSet = false; ingredients = new ArrayList<String>(); } public void setName(String n){ if (n.length() != 0) { name = n; nameSet = true; } } public boolean addIngredient(String ingr){ if (ingredients.contains(ingr)) return false; ingredients.add(ingr); return true; } public String getName(){ return name; } public void removeIngredient(String ingr){ ingredients.remove(ingr); } public ArrayList<String> getIngredients(){ return ingredients; } }