eShopper
Class RecipeIngredient

java.lang.Object
  extended byeShopper.Ingredient
      extended byeShopper.RecipeIngredient

public class RecipeIngredient
extends Ingredient

This is an ingredient that is associated with a recipe.

Author:
Nathan

Method Summary
 boolean equals(java.lang.Object anotherIngredient)
          Overloads the equals() method.
 double getAmount()
          This is the accessor method for the amount of the ingredient.
 eShopperUnit getUnit()
          This is the accessor method for the unit the ingredient is measured in.
 java.lang.String toString()
          Overloads the toString() method, returning the name, amount and units of the ingredient.
 
Methods inherited from class eShopper.Ingredient
getID, getName, setName
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getAmount

public double getAmount()
This is the accessor method for the amount of the ingredient.

Returns:
the amount of the ingredient

getUnit

public eShopperUnit getUnit()
This is the accessor method for the unit the ingredient is measured in.

Returns:
the unit of the ingredient

toString

public java.lang.String toString()
Overloads the toString() method, returning the name, amount and units of the ingredient.

Overrides:
toString in class Ingredient
Returns:
A formatted String with the name, amount and units in it.

equals

public boolean equals(java.lang.Object anotherIngredient)
Overloads the equals() method.

Returns:
true if the IDs of the two ingredients are equal; otherwise false.