|
|||||||||
| 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
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.CoffeeShop |
|---|
CoffeeShop.ShelfProduct |
| Field Summary | |
|---|---|
java.lang.String |
auctionShop
|
static java.util.Vector<Environmental> |
emptyV
|
static java.util.Vector<CoffeeShop.ShelfProduct> |
emptyV2
|
protected java.lang.ref.WeakReference<ShopKeeper> |
shopKeeper
|
| Constructor Summary | |
|---|---|
AuctionCoffeeShop()
|
|
| Method Summary | |
|---|---|
Environmental |
addStoreInventory(Environmental thisThang)
Adds a new item to the store inventory. |
Environmental |
addStoreInventory(Environmental thisThang,
int number,
int price)
Adds a new item to the store inventory so the shopkeeper can sell it. |
CoffeeShop |
build(ShopKeeper SK)
Initializes this shop object with its host ShopKeeper |
void |
buildShopFromXML(java.lang.String text)
Repopulates this shop inventory from a given xml document, restoring store inventory, base inventory, prices, and availability. |
int |
compareTo(CMObject o)
|
long |
contentHash()
Returns a hash of all the items currently in the shop, for help in determining when things change. |
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)
Removes all items like the given item from the base and store inventory. |
void |
deleteShelfProduct(CoffeeShop.ShelfProduct P)
Remove the specific give shelf product from the official stores. |
void |
destroyStoreInventory()
Destroys all the items in this shop. |
boolean |
doIHaveThisInStock(java.lang.String name,
MOB mob)
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. |
int |
enumerableStockSize()
Returns the number of items in the stores base inventory. |
java.util.Iterator<Environmental> |
getEnumerableInventory()
Returns a iterator of all the Environmental objects this shop has in its base inventory. |
Environmental |
getStock(java.lang.String name,
MOB mob)
Searches this shops stock of items for sale for one matching the given name. |
java.util.Iterator<Environmental> |
getStoreInventory()
Returns a iterator of all the Environmental objects this shop has for sale. |
java.util.Iterator<Environmental> |
getStoreInventory(java.lang.String srchStr)
Returns a iterator of all the Environmental objects this shop has for sale which match the given search string. |
java.util.Iterator<CoffeeShop.ShelfProduct> |
getStoreShelves()
Returns a iterator of all the ShelfProduct objects this shop has for sale. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
boolean |
inEnumerableInventory(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. |
boolean |
isSold(int code)
Returns whether the whatIsSold code applies to the shopkeeper hosting this shop. |
boolean |
lowerStock(java.lang.String name)
Searches this shops stock of items for sale for one matching the given name. |
java.lang.String |
makeXML()
Generates an XML document of all available shop inventory, prices, and availability. |
java.lang.String |
name()
The displayable name of this object. |
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.List<Environmental> |
removeSellableProduct(java.lang.String named,
MOB mob)
Searches this shops stock of items for sale for one matching the given name. |
Environmental |
removeStock(java.lang.String name,
MOB mob)
Searches this shops stock of items for sale for one matching the given name. |
void |
resubmitInventory(java.util.List<Environmental> V)
A method for quickly making wholesale changes to a shopkeepers inventory. |
ShopKeeper |
shopKeeper()
Returns the shopKeeper that is hosting this shop |
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. |
CoffeeShop |
weakCopyOf()
Returns a thin copy with independent lists, but the same items as the original host. |
| 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<Environmental> emptyV
public static final java.util.Vector<CoffeeShop.ShelfProduct> emptyV2
public java.lang.String auctionShop
protected java.lang.ref.WeakReference<ShopKeeper> shopKeeper
| Constructor Detail |
|---|
public AuctionCoffeeShop()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String name()
CMObject
name in interface CMObjectEnvironmental.Name()public 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 CoffeeShop build(ShopKeeper SK)
CoffeeShop
build in interface CoffeeShopSK - the shopkeeper that hosts this object
public ShopKeeper shopKeeper()
CoffeeShop
shopKeeper in interface CoffeeShoppublic boolean isSold(int code)
CoffeeShop
isSold in interface CoffeeShopcode - the whatIsSold code
ShopKeeper.DEAL_DESCSpublic boolean inEnumerableInventory(Environmental thisThang)
CoffeeShop
inEnumerableInventory in interface CoffeeShopthisThang - the thing to compare against the base inventory
ShopKeeper.isSold(int),
ShopKeeper.DEAL_INVENTORYONLYpublic Environmental addStoreInventory(Environmental thisThang)
CoffeeShop
addStoreInventory in interface CoffeeShopthisThang - the thing to sell
CoffeeShop.addStoreInventory(Environmental, int, int)public int enumerableStockSize()
CoffeeShop
enumerableStockSize in interface CoffeeShopShopKeeper.isSold(int),
ShopKeeper.DEAL_INVENTORYONLYpublic int totalStockSize()
CoffeeShop
totalStockSize in interface CoffeeShopCoffeeShop.totalStockSizeIncludingDuplicates()public java.util.Iterator<Environmental> getStoreInventory()
CoffeeShop
getStoreInventory in interface CoffeeShoppublic java.util.Iterator<CoffeeShop.ShelfProduct> getStoreShelves()
CoffeeShop
getStoreShelves in interface CoffeeShoppublic boolean lowerStock(java.lang.String name)
CoffeeShop
lowerStock in interface CoffeeShopname - the name of the item to lower the stock of
public CoffeeShop weakCopyOf()
CoffeeShop
weakCopyOf in interface CoffeeShoppublic java.util.Iterator<Environmental> getStoreInventory(java.lang.String srchStr)
CoffeeShop
getStoreInventory in interface CoffeeShopsrchStr - the item to hunt for.
public java.util.Iterator<Environmental> getEnumerableInventory()
CoffeeShop
getEnumerableInventory in interface CoffeeShopShopKeeper.isSold(int),
ShopKeeper.DEAL_INVENTORYONLY
public Environmental addStoreInventory(Environmental thisThang,
int number,
int price)
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 determined
public int totalStockWeight()
CoffeeShop
totalStockWeight in interface CoffeeShoppublic int totalStockSizeIncludingDuplicates()
CoffeeShop
totalStockSizeIncludingDuplicates in interface CoffeeShopCoffeeShop.totalStockSize()public void delAllStoreInventory(Environmental thisThang)
CoffeeShop
delAllStoreInventory in interface CoffeeShopthisThang - the item like which to removeShopKeeper.isSold(int)
public boolean doIHaveThisInStock(java.lang.String name,
MOB mob)
CoffeeShop
doIHaveThisInStock in interface CoffeeShopname - the name of the item to search formob - the mob who is interested (stock can differ depending on customer)
ShopKeeper.isSold(int)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 void resubmitInventory(java.util.List<Environmental> V)
CoffeeShop
resubmitInventory in interface CoffeeShopV - the items for inventory
public Environmental getStock(java.lang.String name,
MOB mob)
CoffeeShop
getStock in interface CoffeeShopname - the name of the item to search formob - the mob who is interested (stock can differ depending on customer)
CoffeeShop.getStoreInventory()public void destroyStoreInventory()
CoffeeShop
destroyStoreInventory in interface CoffeeShop
public Environmental removeStock(java.lang.String name,
MOB mob)
CoffeeShop
removeStock in interface CoffeeShopname - the name of the item to search formob - the mob who is interested (stock can differ depending on customer)
CoffeeShop.getStoreInventory()public void emptyAllShelves()
CoffeeShop
emptyAllShelves in interface CoffeeShop
public java.util.List<Environmental> removeSellableProduct(java.lang.String named,
MOB mob)
CoffeeShop
removeSellableProduct in interface CoffeeShopnamed - the name of the item to search formob - the mob who is interested (stock can differ depending on customer)
CoffeeShop.getStoreInventory()public java.lang.String makeXML()
CoffeeShop
makeXML in interface CoffeeShopCoffeeShop.getStoreInventory(),
CoffeeShop.buildShopFromXML(String)public void buildShopFromXML(java.lang.String text)
CoffeeShop
buildShopFromXML in interface CoffeeShoptext - the xml document to restore fromCoffeeShop.makeXML()public long contentHash()
CoffeeShop
contentHash in interface CoffeeShoppublic void deleteShelfProduct(CoffeeShop.ShelfProduct P)
CoffeeShop
deleteShelfProduct in interface CoffeeShopP - the shelf product to remove permanently
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||