|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcollections.hashset.Cart
public class Cart
Demonstrates adding Product objects that already exist in a HashSet. The test for existence is based on the hashCode and equals methods implemented in the Product class.
Constructor Summary | |
---|---|
Cart()
|
Method Summary | |
---|---|
void |
addProduct(Product product)
|
static void |
main(java.lang.String[] args)
|
void |
removeProduct(Product product)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cart()
Method Detail |
---|
public static void main(java.lang.String[] args)
public void addProduct(Product product)
public void removeProduct(Product product)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |