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 Summary
Fields Modifier and Type Field Description protected IInternalAccess
comp
The component.protected java.lang.String
name
The shop name.
-
Constructor Summary
Constructors Constructor Description ShopService()
Create a new shop service.ShopService(java.lang.String name)
Create a new shop service.
-
Method Summary
All 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.String
getName()
Get the shop name.java.lang.String
toString()
Get the string representation.
-
-
-
Field Detail
-
comp
protected IInternalAccess comp
The component.
-
name
protected java.lang.String name
The shop name.
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the shop name.- Specified by:
getName
in interfaceIShopService
- Returns:
- The name.
-
buyItem
public IFuture<ItemInfo> buyItem(java.lang.String item, double price)
Buy an item.- Specified by:
buyItem
in interfaceIShopService
- Parameters:
item
- The item.
-
getCatalog
public IFuture<ItemInfo[]> getCatalog()
Get the item catalog.- Specified by:
getCatalog
in interfaceIShopService
- Returns:
- The catalog.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-