public static class ShoppingCart.ShoppingCartItem extends Object implements Comparable<ShoppingCart.ShoppingCartItem>, Serializable
| Constructor and Description |
|---|
ShoppingCart.ShoppingCartItem(Cocktail cocktail,
int quantity) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ShoppingCart.ShoppingCartItem o) |
boolean |
equals(Object o) |
Cocktail |
getCocktail() |
int |
getQuantity() |
int |
getTotalPriceInCents() |
int |
hashCode() |
void |
incrementQuantity(int quantity) |
void |
setQuantity(int quantity) |
public int getTotalPriceInCents()
public int compareTo(ShoppingCart.ShoppingCartItem o)
compareTo in interface Comparable<ShoppingCart.ShoppingCartItem>public Cocktail getCocktail()
public void incrementQuantity(int quantity)
quantity - quantity to add for the itempublic int getQuantity()
public void setQuantity(int quantity)
Copyright © 2015. All Rights Reserved.