Class ShopService

    • Field Detail

      • name

        protected java.lang.String name
        The shop name.
    • Constructor Detail

      • ShopService

        public ShopService​(IExternalAccess comp,
                           java.lang.String name)
        Create a new shop service.
        Parameters:
        comp - The active component.
    • Method Detail

      • getName

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

        public IFuture<ItemInfo> buyItem​(java.lang.String item,
                                         double price)
        Buy an item.
        Specified by:
        buyItem in interface IShopService
        Parameters:
        item - The item.
      • toString

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