|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.AuctionCoffeeShop
public class AuctionCoffeeShop
| Field Summary | |
|---|---|
java.lang.String |
auctionShop
|
static java.util.Vector |
emptyV
|
| Constructor Summary | |
|---|---|
AuctionCoffeeShop()
|
|
| 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. |
int |
compareTo(CMObject o)
|
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
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. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
boolean |
inBaseInventory(Environmental thisThang)
Returns whether an item sufficiently like the given item originally existed in this shops inventory when it was created. |
void |
initializeClass()
Called ONCE after all objects are loaded, but before the map is read in during initialization. |
java.lang.String |
makeXML(ShopKeeper shop)
Generates an XML document of all available shop inventory, prices, and availability. |
CMObject |
newInstance()
Returns a new instance of this class. |
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 class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.Vector emptyV
public java.lang.String auctionShop
| Constructor Detail |
|---|
public AuctionCoffeeShop()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic boolean inBaseInventory(Environmental thisThang)
CoffeeShop
inBaseInventory in interface CoffeeShopthisThang - the thing to compare against the base inventory
ShopKeeper.whatIsSold(),
ShopKeeper.DEAL_INVENTORYONLY
public Environmental addStoreInventory(Environmental thisThang,
ShopKeeper shop)
CoffeeShop
addStoreInventory in interface CoffeeShopthisThang - the thing to sellshop - the shop that's selling it
CoffeeShop.addStoreInventory(Environmental, int, int, ShopKeeper)public int baseStockSize()
CoffeeShop
baseStockSize in interface CoffeeShopShopKeeper.whatIsSold(),
ShopKeeper.DEAL_INVENTORYONLYpublic int totalStockSize()
CoffeeShop
totalStockSize in interface CoffeeShopCoffeeShop.totalStockSizeIncludingDuplicates()public java.util.Vector getStoreInventory()
CoffeeShop
getStoreInventory in interface CoffeeShoppublic java.util.Vector getBaseInventory()
CoffeeShop
getBaseInventory in interface CoffeeShopShopKeeper.whatIsSold(),
ShopKeeper.DEAL_INVENTORYONLY
public Environmental addStoreInventory(Environmental thisThang,
int number,
int price,
ShopKeeper shop)
CoffeeShop
addStoreInventory in interface CoffeeShopthisThang - 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
public int totalStockWeight()
CoffeeShop
totalStockWeight in interface CoffeeShoppublic int totalStockSizeIncludingDuplicates()
CoffeeShop
totalStockSizeIncludingDuplicates in interface CoffeeShopCoffeeShop.totalStockSize()
public void delAllStoreInventory(Environmental thisThang,
int whatISell)
CoffeeShop
delAllStoreInventory in interface CoffeeShopthisThang - the item like which to removewhatISell - reference to what kind of stuff the store sellsShopKeeper.whatIsSold()
public boolean doIHaveThisInStock(java.lang.String name,
MOB mob,
int whatISell,
Room startRoom)
CoffeeShop
doIHaveThisInStock in interface CoffeeShopname - 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()public int stockPrice(Environmental likeThis)
CoffeeShop
stockPrice in interface CoffeeShoplikeThis - the item like which to compare
CoffeeShop.getStoreInventory()public int numberInStock(Environmental likeThis)
CoffeeShop
numberInStock in interface CoffeeShoplikeThis - the item like which to compare
CoffeeShop.getStoreInventory()
public Environmental getStock(java.lang.String name,
MOB mob,
int whatISell,
Room startRoom)
CoffeeShop
getStock in interface CoffeeShopname - 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
CoffeeShop.getStoreInventory()
public Environmental removeStock(java.lang.String name,
MOB mob,
int whatISell,
Room startRoom)
CoffeeShop
removeStock in interface CoffeeShopname - 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
CoffeeShop.getStoreInventory()public void emptyAllShelves()
CoffeeShop
emptyAllShelves in interface CoffeeShop
public java.util.Vector removeSellableProduct(java.lang.String named,
MOB mob,
int whatISell,
Room startRoom)
CoffeeShop
removeSellableProduct in interface CoffeeShopnamed - 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
CoffeeShop.getStoreInventory()public java.lang.String makeXML(ShopKeeper shop)
CoffeeShop
makeXML in interface CoffeeShopshop - the shopkeeper shop
CoffeeShop.getStoreInventory(),
CoffeeShop.buildShopFromXML(String, ShopKeeper)
public void buildShopFromXML(java.lang.String text,
ShopKeeper shop)
CoffeeShop
buildShopFromXML in interface CoffeeShoptext - the xml document to restore fromshop - the shopkeeper shopCoffeeShop.makeXML(ShopKeeper)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||