|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CoffeeShop
A CoffeeShop is an object for storing the inventory of a shopkeeper, banker, auctionhouse, merchant, or other object that implements the ShopKeeper interface for the purpose of selling goods and services. ShopKeepers maintain two types of inventory, the base inventory, and the stock inventory. The stock or store inventory is the list of items the shopkeeper currently has for sale, the amounts, base prices, etc. The base inventory is used only for shopkeepers who only buy things like they originally had in stock, and so the base inventory is always populated with a single copy of the original store inventory, to be used as a base of comparison for situations where the stock is empty, but someone is wanting to sell.
ShopKeeper,
ShopKeeper.whatIsSold(),
ShopKeeper.DEAL_INVENTORYONLY| Method Summary | |
|---|---|
Environmental |
addStoreInventory(Environmental thisThang,
int number,
int price,
ShopKeeper shop)
Adds a new item to the store inventory so the shopkeeper can sell it. |
Environmental |
addStoreInventory(Environmental thisThang,
ShopKeeper shop)
Adds a new item to the store inventory. |
int |
baseStockSize()
Returns the number of items in the stores base inventory. |
void |
buildShopFromXML(java.lang.String text,
ShopKeeper shop)
Repopulates this shop inventory from a given xml document, restoring store inventory, base inventory, prices, and availability. |
void |
delAllStoreInventory(Environmental thisThang,
int whatISell)
Removes all items like the given item from the base and store inventory. |
boolean |
doIHaveThisInStock(java.lang.String name,
MOB mob,
int whatISell,
Room startRoom)
Returns whether an item with the given name is presently in this stores stock inventory, and available for sale. |
void |
emptyAllShelves()
Clears both the base and stock/store inventories. |
java.util.Vector |
getBaseInventory()
Returns a Vector of all the Environmental objects this shop has in its base inventory. |
Environmental |
getStock(java.lang.String name,
MOB mob,
int whatISell,
Room startRoom)
Searches this shops stock of items for sale for one matching the given name. |
java.util.Vector |
getStoreInventory()
Returns a Vector of all the Environmental objects this shop has for sale. |
boolean |
inBaseInventory(Environmental thisThang)
Returns whether an item sufficiently like the given item originally existed in this shops inventory when it was created. |
java.lang.String |
makeXML(ShopKeeper shop)
Generates an XML document of all available shop inventory, prices, and availability. |
int |
numberInStock(Environmental likeThis)
Returns the number of items like the one given that the shopkeeper presently has in stock and available for sale. |
java.util.Vector |
removeSellableProduct(java.lang.String named,
MOB mob,
int whatISell,
Room startRoom)
Searches this shops stock of items for sale for one matching the given name. |
Environmental |
removeStock(java.lang.String name,
MOB mob,
int whatISell,
Room startRoom)
Searches this shops stock of items for sale for one matching the given name. |
int |
stockPrice(Environmental likeThis)
Returns the base stock price (not the final price by any means) that the shop will use as a foundation for determining the given items price. |
int |
totalStockSize()
Returns the number of items this shop currently has for sale. |
int |
totalStockSizeIncludingDuplicates()
The number of items in the store inventory, taking number in stock into account. |
int |
totalStockWeight()
Total weight, in pounds, of all items in the store inventory, taking number in stock into account. |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, ID, initializeClass, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
boolean inBaseInventory(Environmental thisThang)
thisThang - the thing to compare against the base inventory
ShopKeeper.whatIsSold(),
ShopKeeper.DEAL_INVENTORYONLY
Environmental addStoreInventory(Environmental thisThang,
ShopKeeper shop)
thisThang - the thing to sellshop - the shop that's selling it
addStoreInventory(Environmental, int, int, ShopKeeper)int baseStockSize()
ShopKeeper.whatIsSold(),
ShopKeeper.DEAL_INVENTORYONLYint totalStockSize()
totalStockSizeIncludingDuplicates()java.util.Vector getStoreInventory()
java.util.Vector getBaseInventory()
ShopKeeper.whatIsSold(),
ShopKeeper.DEAL_INVENTORYONLYvoid emptyAllShelves()
Environmental addStoreInventory(Environmental thisThang,
int number,
int price,
ShopKeeper shop)
thisThang - the item/mob/ability to sellnumber - the number of items to sellprice - the price of the item (in base currency) or -1 to have it determinedshop - the shop selling the item
int totalStockWeight()
int totalStockSizeIncludingDuplicates()
totalStockSize()
void delAllStoreInventory(Environmental thisThang,
int whatISell)
thisThang - the item like which to removewhatISell - reference to what kind of stuff the store sellsShopKeeper.whatIsSold()
boolean doIHaveThisInStock(java.lang.String name,
MOB mob,
int whatISell,
Room startRoom)
name - the name of the item to search formob - the mob who is interested (stock can differ depending on customer)whatISell - reference to what kind of stuff the store sellsstartRoom - the shops start room, for determining jurisdiction
ShopKeeper.whatIsSold()int stockPrice(Environmental likeThis)
likeThis - the item like which to compare
getStoreInventory()int numberInStock(Environmental likeThis)
likeThis - the item like which to compare
getStoreInventory()
Environmental getStock(java.lang.String name,
MOB mob,
int whatISell,
Room startRoom)
name - the name of the item to search formob - the mob who is interested (stock can differ depending on customer)whatISell - reference to what kind of stuff the store sellsstartRoom - the shops start room, for determining jurisdiction
getStoreInventory()
Environmental removeStock(java.lang.String name,
MOB mob,
int whatISell,
Room startRoom)
name - the name of the item to search formob - the mob who is interested (stock can differ depending on customer)whatISell - reference to what kind of stuff the store sellsstartRoom - the shops start room, for determining jurisdiction
getStoreInventory()
java.util.Vector removeSellableProduct(java.lang.String named,
MOB mob,
int whatISell,
Room startRoom)
named - the name of the item to search formob - the mob who is interested (stock can differ depending on customer)whatISell - reference to what kind of stuff the store sellsstartRoom - the shops start room, for determining jurisdiction
getStoreInventory()java.lang.String makeXML(ShopKeeper shop)
shop - the shopkeeper shop
getStoreInventory(),
buildShopFromXML(String, ShopKeeper)
void buildShopFromXML(java.lang.String text,
ShopKeeper shop)
text - the xml document to restore fromshop - the shopkeeper shopmakeXML(ShopKeeper)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||