Class ShopService

java.lang.Object
jadex.bdi.shop.ShopService
All Implemented Interfaces:
IShopService

public class ShopService extends Object implements IShopService
The shop for buying goods at the shop.
  • Field Details

    • shopagent

      protected ShopAgent shopagent
      The component.
    • agent

      protected jadex.core.IComponent agent
      The component.
    • name

      protected String name
      The shop name.
  • Constructor Details

    • ShopService

      public ShopService(String name)
      Create a new shop service.
  • Method Details

    • getName

      public String getName()
      Get the shop name.
      Specified by:
      getName in interface IShopService
      Returns:
      The name.
    • buyItem

      public jadex.future.IFuture<ItemInfo> buyItem(String item, double price)
      Buy an item.
      Specified by:
      buyItem in interface IShopService
      Parameters:
      item - The item.
    • getCatalog

      public jadex.future.IFuture<ItemInfo[]> getCatalog()
      Get the item catalog.
      Specified by:
      getCatalog in interface IShopService
      Returns:
      The catalog.
    • toString

      public String toString()
      Get the string representation.
      Overrides:
      toString in class Object
      Returns:
      The string representation.