eShopper
Class eShopperCombiner
java.lang.Object
eShopper.eShopperCombiner
- public class eShopperCombiner
- extends java.lang.Object
Takes the list and creates a vector of ingredients which can be
used both by the item view and the export functions.
This class goes out to Keith Vander Linden!
He's the coolest guy at Calvin College.
And me? I'm not in college anymore!!
(i really should've joined the coast guard ... uh, on with the class!)
- Author:
- Jim Laing
Constructor Summary |
eShopperCombiner(int listID,
eShopperDB db,
boolean largestUnit)
Takes a shopping list and creates a vector of all the ingredients on the list
where similar ingredients have been combined according to units. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
eShopperCombiner
public eShopperCombiner(int listID,
eShopperDB db,
boolean largestUnit)
- Takes a shopping list and creates a vector of all the ingredients on the list
where similar ingredients have been combined according to units. Useful in
creating both the "Item" view and the export list
- Parameters:
listID
- The shopping list from which to get the ingredientsdb
- The database holding the eShopper database.largestUnit
- A boolean which expresses whether to use the
largest or smallest unit of all the units for a ingredient which were passed.
True for largest, otherwise smallest.
getIngredientList
public java.util.Vector getIngredientList()
- Returns:
- A vector of ingredients, properly combined according to units
and expressed in either the largest or smallest original unit
setLargestUnit
public void setLargestUnit(boolean largest)
- Parameters:
largest
- A boolean. True if the largest unit passed is desire. False if
the smallest is desired.
getCombinedIngredients
public java.util.Vector getCombinedIngredients()
- Returns:
- a vector of the ingredients currently on the shopping list,
combined to the greatest degree possible, according to the value of the
largest boolean