eShopper
Class Ingredient

java.lang.Object
  extended byeShopper.Ingredient
Direct Known Subclasses:
RecipeIngredient

public class Ingredient
extends java.lang.Object

This is an Ingredient that is in the database, but doesn't need the information associated with being in a recipe or a shopping list.

Author:
Adam

Constructor Summary
Ingredient(int ID, java.lang.String name)
           
 
Method Summary
 int getID()
          This is a getter method for the IngredientID.
 java.lang.String getName()
          This is a getter method for the ingredient's name.
 void setName(java.lang.String newName)
          This sets the Ingredient's name to the given name.
 java.lang.String toString()
          This implements the toString method and returns the name of the ingredient.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ingredient

public Ingredient(int ID,
                  java.lang.String name)
Method Detail

getID

public int getID()
This is a getter method for the IngredientID.

Returns:
The ID of the ingredient.

getName

public java.lang.String getName()
This is a getter method for the ingredient's name.

Returns:
The name of the ingredient.

setName

public void setName(java.lang.String newName)
This sets the Ingredient's name to the given name.

Parameters:
newName - The name the Ingredient should have.

toString

public java.lang.String toString()
This implements the toString method and returns the name of the ingredient.