|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Container
A container is an item that contains other items, including other containers. Next to the Item interface, the Container interface is probably the most basic.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable |
---|
Wearable.CODES |
Field Summary | |
---|---|
static int |
CONTAIN_ANYTHING
Container type that overrides all others -- the container can hold anything! |
static int |
CONTAIN_BODIES
Container Type flag that means the container can hold corpses |
static int |
CONTAIN_CAGED
Container Type flag that means the container can hold caged animals |
static int |
CONTAIN_CLOTHES
Container Type flag that means the container can hold clothing |
static int |
CONTAIN_COINS
Container Type flag that means the container can hold coins |
static int |
CONTAIN_DAGGERS
Container Type flag that means the container can hold daggers |
static java.lang.String[] |
CONTAIN_DESCS
Ordinal list of the names of all the container bitmask types. |
static int |
CONTAIN_DRINKABLES
Container Type flag that means the container can hold drinkables |
static int |
CONTAIN_EATABLES
Container Type flag that means the container can hold foods |
static int |
CONTAIN_FOOTWEAR
Container Type flag that means the container can hold shoes |
static int |
CONTAIN_KEYS
Container Type flag that means the container can hold keys |
static int |
CONTAIN_LIQUID
Container Type flag that means the container can hold liquids |
static int |
CONTAIN_ONEHANDWEAPONS
Container Type flag that means the container can hold one handed weapons |
static int |
CONTAIN_OTHERWEAPONS
Container Type flag that means the container can hold other weapons |
static int |
CONTAIN_RAWMATERIALS
Container Type flag that means the container can hold raw resources |
static int |
CONTAIN_READABLES
Container Type flag that means the container can hold books and such |
static int |
CONTAIN_SCROLLS
Container Type flag that means the container can hold scrolls |
static int |
CONTAIN_SMOKEABLES
Container Type flag that means the container can hold smokeables |
static int |
CONTAIN_SSCOMPONENTS
Container Type flag that means the container can hold space ship components |
static int |
CONTAIN_SWORDS
Container Type flag that means the container can hold swords |
Fields inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable |
---|
DEFAULT_WORN_CODES, DEFAULT_WORN_DEPENDENCYGRID, DEFAULT_WORN_DESCS, DEFAULT_WORN_ORDER, DEFAULT_WORN_USUAL_NAMES, DEFAULT_WORN_WEIGHT_POINTS, DEFAULT_WORN_WEIGHTS, FILTER_ANY, FILTER_MOBINVONLY, FILTER_ROOMONLY, FILTER_UNWORNONLY, FILTER_WORNONLY, HIGHEST_WORN_CODE, IN_INVENTORY, WORN_ABOUT_BODY, WORN_ARMS, WORN_BACK, WORN_EARS, WORN_EYES, WORN_FEET, WORN_FLOATING_NEARBY, WORN_HANDS, WORN_HEAD, WORN_HELD, WORN_LEFT_FINGER, WORN_LEFT_WRIST, WORN_LEGS, WORN_MOUTH, WORN_NECK, WORN_RIGHT_FINGER, WORN_RIGHT_WRIST, WORN_TORSO, WORN_WAIST, WORN_WIELD |
Method Summary | |
---|---|
boolean |
canContain(Item I)
Returns whether this container is allowed to contain the given object. |
int |
capacity()
Returns the maximum weight that can fit inside this container. |
long |
containTypes()
Returns a bitmap of the types of things that this container can hold. |
void |
emptyPlease(boolean flatten)
Empties this container into its owner. |
ReadOnlyList<Item> |
getContents()
Returns all the immediate items in this container, including other containers, but not the contents of those innner containers. |
ReadOnlyList<Item> |
getDeepContents()
Returns all the items in this container, including other containers and THEIR contents, recursively. |
boolean |
hasContent()
Returns whether there is anything at all in this container. |
boolean |
isInside(Item I)
Returns whether the given item is, in fact, inside this container, even recursively. |
void |
setCapacity(int newValue)
Sets the maximum weight that can fit inside this container. |
void |
setContainTypes(long containTypes)
Sets a bitmap of the types of things that this container can hold. |
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Item |
---|
baseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setOwner, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, value |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Rider |
---|
riding, setRiding |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Physical |
---|
description, displayText, name |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental |
---|
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
---|
getTickStatus, name, 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, delAllEffects, delEffect, eachEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, recoverPhyStats, setBasePhyStats |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Behavable |
---|
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.DBIdentifiable |
---|
canSaveDatabaseID, databaseID, setDatabaseID |
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable |
---|
amBeingWornProperly, amWearingAt, canWear, compareProperLocations, fitsOn, rawLogicalAnd, rawProperLocationBitmap, rawWornCode, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, unWear, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Readable |
---|
isReadable, readableText, setReadable, setReadableText |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CloseableLockable |
---|
defaultsClosed, defaultsLocked, hasADoor, hasALock, isLocked, isOpen, keyName, openDelayTicks, setDoorsNLocks, setKeyName, setOpenDelayTicks |
Field Detail |
---|
static final int CONTAIN_ANYTHING
setContainTypes(long)
,
containTypes()
,
Constant Field Valuesstatic final int CONTAIN_LIQUID
static final int CONTAIN_COINS
static final int CONTAIN_SWORDS
static final int CONTAIN_DAGGERS
static final int CONTAIN_OTHERWEAPONS
static final int CONTAIN_ONEHANDWEAPONS
static final int CONTAIN_BODIES
static final int CONTAIN_READABLES
static final int CONTAIN_SCROLLS
static final int CONTAIN_CAGED
static final int CONTAIN_KEYS
static final int CONTAIN_DRINKABLES
static final int CONTAIN_CLOTHES
static final int CONTAIN_SMOKEABLES
static final int CONTAIN_SSCOMPONENTS
static final int CONTAIN_FOOTWEAR
static final int CONTAIN_RAWMATERIALS
static final int CONTAIN_EATABLES
static final java.lang.String[] CONTAIN_DESCS
setContainTypes(long)
,
containTypes()
Method Detail |
---|
ReadOnlyList<Item> getDeepContents()
getContents()
ReadOnlyList<Item> getContents()
getDeepContents()
int capacity()
setCapacity(int)
void setCapacity(int newValue)
newValue
- the maximum weight that can fit inside this containercapacity()
boolean hasContent()
boolean canContain(Item I)
I
- the item to check against the allowed content
setContainTypes(long)
,
containTypes()
boolean isInside(Item I)
I
- the item to check against the content
long containTypes()
setContainTypes(long)
,
CONTAIN_ANYTHING
,
CONTAIN_DESCS
void setContainTypes(long containTypes)
containTypes
- a bitmap of the types of things that this container can hold.containTypes()
,
CONTAIN_ANYTHING
,
CONTAIN_DESCS
void emptyPlease(boolean flatten)
flatten
- if true, will also remove all recursive items from their containers
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |