|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eShopper.eShopperNode eShopper.eShopperIngredient
This class is for the ingredients in a list. It has no children. It is a subclass of eShopperNode.
Constructor Summary | |
eShopperIngredient(int nodeID,
int ingredientID,
int listID,
eShopperDB db,
float qty,
int unitid)
|
Method Summary | |
boolean |
canCombineWith(eShopperIngredient i)
This decides whether the quantity of this Ingredient can be combined with the quantity of another. |
void |
combineWith(eShopperIngredient i,
boolean largest)
This combines the quantities of two Ingredients. |
java.util.Vector |
getChildren()
This returns the children of the Ingredient. |
java.lang.String |
getDate()
This returns the date associated with the Ingredient. |
java.lang.String |
getDescription()
This accesses the description associated with the Ingredient. |
java.lang.String |
getName()
This is for getting the name of the Ingredient. |
float |
getQuantity()
This accesses the quantity of the Ingredient in the list. |
int |
getUnitID()
This accesses the UnitID of the Ingredient. |
int |
ingredientID()
This accesses the unique ingredientID of the Ingredient. |
int |
nodeID()
This accesses the nodeID of the Ingredient |
java.lang.String |
toString()
This overloads the toString() method, and returns the name and quantity of the Ingredient. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public eShopperIngredient(int nodeID, int ingredientID, int listID, eShopperDB db, float qty, int unitid)
Method Detail |
public java.util.Vector getChildren()
getChildren
in class eShopperNode
public java.lang.String toString()
toString
in class eShopperNode
public java.lang.String getName()
public int nodeID()
nodeID
in class eShopperNode
public int ingredientID()
public java.lang.String getDescription()
public float getQuantity()
public int getUnitID()
public java.lang.String getDate()
getDate
in class eShopperNode
public boolean canCombineWith(eShopperIngredient i)
i
- The Ingredient with which this one should be combined.
public void combineWith(eShopperIngredient i, boolean largest)
i
- The Ingredient that this Ingredient should be combined with.largest
- The largest unit of this type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |