FileDocCategorySizeDatePackage
ShoppingCart.javaAPI DocExample790Sat Mar 15 19:39:50 GMT 2003com.oreilly.javaxp.cactus.servlet

ShoppingCart

public class ShoppingCart extends Object implements Serializable
author
Brian M. Coyner $version $Id: ShoppingCart.java,v 1.4 2003/02/27 00:24:43 jepc Exp $

Fields Summary
private Map
cart
Constructors Summary
Methods Summary
public voidaddItem(Item item)


        
        this.cart.put(item.getID(), item);
    
public voidclear()

        this.cart.clear();
    
public java.util.IteratorgetAllItems()

        return this.cart.values().iterator();
    
public ItemgetItem(java.lang.String id)

        return (Item) this.cart.get(id);
    
public voidremoveItem(java.lang.String itemID)

        this.cart.remove(itemID);