|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ItemPossessor
An interface for something capable of possessing Items
| Nested Class Summary | |
|---|---|
static class |
ItemPossessor.Expire
constants for the addItem methods to denote how long the item lives before expiring |
static class |
ItemPossessor.Find
constant for the findItem/findItems method denoting special modifying flags on the search |
static class |
ItemPossessor.Move
constant for the moveItemTo methods to denote flags are being given -- normal operation |
| Field Summary |
|---|
| Method Summary | |
|---|---|
void |
addItem(Item item)
Adds a new item to its possessor. |
void |
addItem(Item item,
ItemPossessor.Expire expire)
Adds a new item to its possessor, with an expiration code. |
void |
delItem(Item item)
Removes the item from this possessor. |
Item |
findItem(Item goodLocation,
java.lang.String itemID)
Returns the item in the given container that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller name is found). |
Item |
findItem(java.lang.String itemID)
Returns the item in this possessor that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller name is found). |
java.util.List<Item> |
findItems(Item goodLocation,
java.lang.String itemID)
Returns all items in the given container that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller names are found). |
java.util.List<Item> |
findItems(java.lang.String itemID)
Returns all items in this possessor that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller names are found). |
Item |
getItem(int i)
Returns the item at the given index, regardless of container status, visibility, or other modifiers. |
boolean |
isContent(Item item)
Returns whether the given item is in this possessors list. |
java.util.Enumeration<Item> |
items()
An enumeration of all the items at this possessor. |
void |
moveItemTo(Item container)
Intelligently removes an item from its current location and moves it to this possessor, managing any container contents. |
void |
moveItemTo(Item container,
ItemPossessor.Expire expire,
ItemPossessor.Move... moveFlags)
Intelligently removes an item from its current location and moves it to this possessor, managing any container contents, and possibly followers/riders if the item is a cart. |
int |
numItems()
Returns the total number of items at this possessor, regardless of container status. |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental |
|---|
description, displayText, expirationDate, image, isGeneric, maxRange, minRange, miscTextFormat, name, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
|---|
getTickStatus, tick |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting |
|---|
affectCharState, affectCharStats, affectPhyStats |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener |
|---|
executeMsg, okMessage |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent |
|---|
amDestroyed, destroy, isSavable, setSavable |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, ID, initializeClass, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable |
|---|
getSaveStatIndex, getStat, getStatCodes, isStat, setStat |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Affectable |
|---|
addEffect, addNonUninvokableEffect, basePhyStats, delEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, recoverPhyStats, setBasePhyStats |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Behavable |
|---|
addBehavior, addScript, behaviors, delBehavior, delScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts |
| Method Detail |
|---|
void addItem(Item item)
item - the item to adddelItem(Item)
void addItem(Item item,
ItemPossessor.Expire expire)
item - the item to addItemPossessor.Expire
void moveItemTo(Item container,
ItemPossessor.Expire expire,
ItemPossessor.Move... moveFlags)
container - the item to addexpire - the expiration codemoveFlags - any flags related to the moveItemPossessor.Expirevoid moveItemTo(Item container)
container - the item to addItemPossessor.Expirevoid delItem(Item item)
item - the item to removeint numItems()
Item getItem(int i)
i - the index of the item
java.util.Enumeration<Item> items()
Item findItem(Item goodLocation,
java.lang.String itemID)
goodLocation - the container to look in, or null for noneitemID - the name or partial name of the item to fetch
Item findItem(java.lang.String itemID)
itemID - the name or partial name of the item to fetch
java.util.List<Item> findItems(Item goodLocation,
java.lang.String itemID)
goodLocation - the container to look in, or null for noneitemID - the name or partial name of the item to fetch
java.util.List<Item> findItems(java.lang.String itemID)
itemID - the name or partial name of the item to fetch
boolean isContent(Item item)
item - the item to check
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||