com.sun.j2ee.blueprints.shoppingcart.cart.model
Class ShoppingCartModel
java.lang.Object
|
+--com.sun.j2ee.blueprints.shoppingcart.cart.model.ShoppingCartModel
- Direct Known Subclasses:
- ShoppingCartWebImpl
- public class ShoppingCartModel
- extends java.lang.Object
- implements java.io.Serializable
This class represents the model data for the shopping cart.
It is a value object and has fine grained getter methods.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ShoppingCartModel
public ShoppingCartModel(java.util.Collection items)
getSize
public int getSize()
getCart
public java.util.Collection getCart()
- Returns:
- an collection of all the CartItems.
getItems
public java.util.Iterator getItems()
- Returns:
- an iterator over all the CartItems.
getTotalCost
public double getTotalCost()
copy
public void copy(ShoppingCartModel src)
- copies over the data from the specified shopping cart. Note
that it is a shallow copy.
Copyright © 2000 Sun Microsystems Inc. All Rights Reserved.