Package jadex.examples.shop
Class ShopAgent
- java.lang.Object
-
- jadex.examples.shop.ShopAgent
-
public class ShopAgent extends java.lang.Object
Micro agent implementation of the shop.
-
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccess
agent
The agent.protected double
money
The money account.
-
Constructor Summary
Constructors Constructor Description ShopAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>
agentCreated()
Called once after agent creation.ItemInfo
buyItem(java.lang.String name, double price)
Buy an item.ItemInfo[]
getCatalog()
Get the item catalog.
-
-
-
Field Detail
-
agent
protected IInternalAccess agent
The agent.
-
money
protected double money
The money account.
-
-
Method Detail
-
agentCreated
public IFuture<java.lang.Void> agentCreated()
Called once after agent creation.
-
buyItem
public ItemInfo buyItem(java.lang.String name, double price)
Buy an item.- Parameters:
item
- The item.
-
getCatalog
public ItemInfo[] getCatalog()
Get the item catalog.- Returns:
- The catalog.
-
-