public class MarketProfile extends Object
Modifier and Type | Field and Description |
---|---|
private HashMap<URLDescriptor,Inventory> |
profile |
Constructor and Description |
---|
MarketProfile() |
Modifier and Type | Method and Description |
---|---|
void |
add(URLDescriptor url,
Product product) |
Inventory |
getAgentInventory(URLDescriptor url)
Retrieve the inventory of the interesting agent
|
URLDescriptor |
getHighestAgent(Product product)
Return the URL of the agent that will pay the highest price for the product
|
URLDescriptor |
getLowestAgent(Product product)
Return the URL of the agent that is offering the product for the lowest price
|
HashMap<URLDescriptor,Inventory> |
getProfile() |
void |
remove(URLDescriptor url) |
private HashMap<URLDescriptor,Inventory> profile
public HashMap<URLDescriptor,Inventory> getProfile()
public void add(URLDescriptor url, Product product)
public void remove(URLDescriptor url)
public URLDescriptor getHighestAgent(Product product)
product
- public URLDescriptor getLowestAgent(Product product)
product
- public Inventory getAgentInventory(URLDescriptor url)
url
-