|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultAbilityComponent
public class DefaultAbilityComponent
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.AbilityComponent |
|---|
AbilityComponent.CompConnector, AbilityComponent.CompLocation, AbilityComponent.CompType |
| Constructor Summary | |
|---|---|
DefaultAbilityComponent()
|
|
| Method Summary | |
|---|---|
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. |
int |
getAmount()
Returns the number of items matching this component which must be present. |
MaskingLibrary.CompiledZMask |
getCompiledMask()
Returns the compiled zapper mask to determine whether a given agent qualifies this item as a component. |
AbilityComponent.CompConnector |
getConnector()
Returns an enum describing how this component "connects" with the following component logically. |
AbilityComponent.CompLocation |
getLocation()
Returns an enum value describing where an item must be to be considered a valid component. |
long |
getLongType()
For resource and material type item component filters, this will return the type comparison object as a long value. |
java.lang.String |
getMaskStr()
Returns the raw zapper mask to determine whether a given agent qualifies this item as a component. |
java.lang.String |
getStringType()
For resource and material type item component filters, this will return the type comparison object as a String value. |
java.lang.String |
getSubType()
Returns the item filter type for determining whether an item is a component. |
AbilityComponent.CompType |
getType()
Returns the item filter type for determining whether an item is a component. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
void |
initializeClass()
Called ONCE after all objects are loaded, but before the map is read in during initialization. |
boolean |
isConsumed()
Gets whether or not this component is consumed upon use |
java.lang.String |
name()
The displayable name of this object. |
CMObject |
newInstance()
Returns a new instance of this class. |
void |
setAmount(int amount)
Sets the number of items matching this component which must be present. |
void |
setConnector(AbilityComponent.CompConnector connector)
Sets an enum describing how this component "connects" with the following component logically. |
void |
setConsumed(boolean isConsumed)
Sets whether or not this component is consumed upon use |
void |
setLocation(AbilityComponent.CompLocation location)
Sets an enum value describing where an item must be to be considered a valid component. |
void |
setMask(java.lang.String maskStr)
Sets the raw zapper mask to determine whether a given agent qualifies this item as a component. |
void |
setType(AbilityComponent.CompType type,
java.lang.Object typeObj,
java.lang.String subType)
Sets the item filter type for determining whether an item is a component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAbilityComponent()
| 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 newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic AbilityComponent.CompConnector getConnector()
AbilityComponent
getConnector in interface AbilityComponentAbilityComponent.CompConnector,
AbilityComponent.setConnector(CompConnector)public void setConnector(AbilityComponent.CompConnector connector)
AbilityComponent
setConnector in interface AbilityComponentconnector - a connector enumAbilityComponent.CompConnector,
AbilityComponent.getConnector()public AbilityComponent.CompLocation getLocation()
AbilityComponent
getLocation in interface AbilityComponentAbilityComponent.CompLocation,
AbilityComponent.setLocation(CompLocation)public void setLocation(AbilityComponent.CompLocation location)
AbilityComponent
setLocation in interface AbilityComponentlocation - where an item must be to be a componentAbilityComponent.CompLocation,
AbilityComponent.getLocation()public boolean isConsumed()
AbilityComponent
isConsumed in interface AbilityComponentAbilityComponent.setConsumed(boolean)public void setConsumed(boolean isConsumed)
AbilityComponent
setConsumed in interface AbilityComponentisConsumed - true if consumed, false otherwiseAbilityComponent.isConsumed()public int getAmount()
AbilityComponent
getAmount in interface AbilityComponentAbilityComponent.setAmount(int)public void setAmount(int amount)
AbilityComponent
setAmount in interface AbilityComponentamount - the number of items matching this component which must be presentAbilityComponent.getAmount()public MaskingLibrary.CompiledZMask getCompiledMask()
AbilityComponent
getCompiledMask in interface AbilityComponentAbilityComponent.getMaskStr(),
AbilityComponent.setMask(String),
MaskingLibrarypublic java.lang.String getMaskStr()
AbilityComponent
getMaskStr in interface AbilityComponentAbilityComponent.getCompiledMask(),
AbilityComponent.setMask(String),
MaskingLibrarypublic void setMask(java.lang.String maskStr)
AbilityComponent
setMask in interface AbilityComponentmaskStr - the raw zapper maskAbilityComponent.getCompiledMask(),
AbilityComponent.getMaskStr(),
MaskingLibrarypublic AbilityComponent.CompType getType()
AbilityComponent
getType in interface AbilityComponentAbilityComponent.CompType,
AbilityComponent.setType(CompType, Object, String)
public void setType(AbilityComponent.CompType type,
java.lang.Object typeObj,
java.lang.String subType)
AbilityComponent
setType in interface AbilityComponenttype - the CompType enumtypeObj - either a Integer object or a StringsubType - the typeObj subTypeAbilityComponent.CompType,
AbilityComponent.getType(),
AbilityComponent.getSubType(),
AbilityComponent.getLongType(),
AbilityComponent.getStringType()public long getLongType()
AbilityComponent
getLongType in interface AbilityComponentAbilityComponent.setType(CompType, Object, String)public java.lang.String getStringType()
AbilityComponent
getStringType in interface AbilityComponentAbilityComponent.setType(CompType, Object, String)public java.lang.String getSubType()
AbilityComponent
getSubType in interface AbilityComponentAbilityComponent.CompType,
AbilityComponent.setType(CompType, Object, String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||