com.annahid.libs.artenus.unified
ProductList
Represents a group of products, accessible using their SKUs.
See Also:
public class ProductList
Constructor Summary
Modifier and Type | Constructor and Description |
---|---|
public | ProductList() |
Method Summary
Modifier and Type | Method and Description |
---|---|
public Product | get(String sku) Gets a product from this list. |
public Collection<Product> | getAllProducts() Gets all products in this list. |
public void | put(Product product) Adds a new product to this list. |
Methods inherited from java.lang.Object
clone
, equals
, finalize
, getClass
, hashCode
, notify
, notifyAll
, toString
, wait
, wait
, wait
Method Detail
get | ||
---|---|---|
public Product get( String sku ) Gets a product from this list. Parameters:
Returns:
The desired product, or null if it doesn't exist in the group |
getAllProducts |
---|
public Collection<Product> getAllProducts() Gets all products in this list. Returns:
A collection of products |
put | ||
---|---|---|
public void put( Product product ) Adds a new product to this list. Parameters:
|