Class OutfitShopInventory
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,V>
games.stendhal.server.entity.npc.shop.ShopInventory<String,Pair<String,Integer>>
games.stendhal.server.entity.npc.shop.OutfitShopInventory
Represents contents & prices of an outfit shop.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionOutfitShopInventory(ShopType shopType, String name) creates an OutfitShopInventory -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTradeFor(String name, String required, int count) Retrieves an outfit sold by shop.getOutfitString(String name) Retrieves a string representation of an outfit sold by shop.Retrieves the price of an outfit sold by shop.voidAdds an outfit to shop.voidAdds an outfit to shop.Methods inherited from class games.stendhal.server.entity.npc.shop.ShopInventory
addMerchantConfigurator, getMerchantConfigurators, getName, getShopType, getTradeFor, getTradeForMethods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
OutfitShopInventory
creates an OutfitShopInventory- Parameters:
shopType- type of shopname- name of shop
-
-
Method Details
-
put
Adds an outfit to shop.- Parameters:
name- String identifier.outfit- Outfit to be sold.price- Amount of money required to buy outfit.
-
put
Adds an outfit to shop.- Parameters:
name- String identifier.outfit- Outfit to be sold.price- Amount of money required to buy outfit.
-
getOutfitString
Retrieves a string representation of an outfit sold by shop.- Parameters:
name- String identifier.- Returns:
- Outfit string or null if name not found.
-
getOutfit
Retrieves an outfit sold by shop.- Parameters:
name- String identifier.- Returns:
- Outfit or null if name not found.
-
getPrice
Retrieves the price of an outfit sold by shop. -
addTradeFor
- Overrides:
addTradeForin classShopInventory<String,Pair<String, Integer>>
-