Class ItemShopInventory
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,Integer>
games.stendhal.server.entity.npc.shop.ItemShopInventory
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Integer>
Represents contents & prices of an item 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
ConstructorsConstructorDescriptionItemShopInventory(ShopType shopType, String name) creates an ItemShopInventory -
Method Summary
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
-
ItemShopInventory
creates an ItemShopInventory- Parameters:
shopType- type of shopname- name of shop
-
-
Method Details
-
getPrice
Retrieves the price of an item sold or bought by shop.- Specified by:
getPricein classShopInventory<String,Integer> - Parameters:
name- String identifier.- Returns:
- Amount of money required to buy outfit or null if name not found.
-
addTradeFor
- Overrides:
addTradeForin classShopInventory<String,Integer>
-