Package jadex.bdi.examples.shop
Class ShopService
- java.lang.Object
- 
- jadex.bdi.examples.shop.ShopService
 
- 
- All Implemented Interfaces:
- IShopService
 
 public class ShopService extends java.lang.Object implements IShopService The shop for buying goods at the shop.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IInternalAccesscompThe component.protected java.lang.StringnameThe shop name.
 - 
Constructor SummaryConstructors Constructor Description ShopService()Create a new shop service.ShopService(java.lang.String name)Create a new shop service.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<ItemInfo>buyItem(java.lang.String item, double price)Buy an item.IFuture<ItemInfo[]>getCatalog()Get the item catalog.java.lang.StringgetName()Get the shop name.java.lang.StringtoString()Get the string representation.
 
- 
- 
- 
Field Detail- 
compprotected IInternalAccess comp The component.
 - 
nameprotected java.lang.String name The shop name.
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Get the shop name.- Specified by:
- getNamein interface- IShopService
- Returns:
- The name.
 
 - 
buyItempublic IFuture<ItemInfo> buyItem(java.lang.String item, double price) Buy an item.- Specified by:
- buyItemin interface- IShopService
- Parameters:
- item- The item.
 
 - 
getCatalogpublic IFuture<ItemInfo[]> getCatalog() Get the item catalog.- Specified by:
- getCatalogin interface- IShopService
- Returns:
- The catalog.
 
 - 
toStringpublic java.lang.String toString() Get the string representation.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- The string representation.
 
 
- 
 
-