Class OutfitShopInventory

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Pair<String,Integer>>

public class OutfitShopInventory extends ShopInventory<String,Pair<String,Integer>>
Represents contents & prices of an outfit shop.
See Also:
  • Constructor Details

    • OutfitShopInventory

      public OutfitShopInventory(ShopType shopType, String name)
      creates an OutfitShopInventory
      Parameters:
      shopType - type of shop
      name - name of shop
  • Method Details

    • put

      public void put(String name, String outfit, int price)
      Adds an outfit to shop.
      Parameters:
      name - String identifier.
      outfit - Outfit to be sold.
      price - Amount of money required to buy outfit.
    • put

      public void put(String name, Outfit outfit, int price)
      Adds an outfit to shop.
      Parameters:
      name - String identifier.
      outfit - Outfit to be sold.
      price - Amount of money required to buy outfit.
    • getOutfitString

      public String getOutfitString(String name)
      Retrieves a string representation of an outfit sold by shop.
      Parameters:
      name - String identifier.
      Returns:
      Outfit string or null if name not found.
    • getOutfit

      public Outfit getOutfit(String name)
      Retrieves an outfit sold by shop.
      Parameters:
      name - String identifier.
      Returns:
      Outfit or null if name not found.
    • getPrice

      public Integer getPrice(String name)
      Retrieves the price of an outfit sold by shop.
      Specified by:
      getPrice in class ShopInventory<String,Pair<String,Integer>>
      Parameters:
      name - String identifier.
      Returns:
      Amount of money required to buy outfit or null if name not found.
    • addTradeFor

      public void addTradeFor(String name, String required, int count)
      Overrides:
      addTradeFor in class ShopInventory<String,Pair<String,Integer>>