AbilityComponent, CMCommon, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>public class DefaultAbilityComponent extends java.lang.Object implements AbilityComponent
AbilityComponent.CompConnector, AbilityComponent.CompLocation, AbilityComponent.CompTypeidConverter| Constructor | Description |
|---|---|
DefaultAbilityComponent() |
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
java.lang.String |
getAbilityID() |
Returns the ability ID that this component serves.
|
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.
|
java.lang.String |
getTriggererDef() |
Returns the raw triggering ritual definition string to execute
this ability for which this component exists.
|
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 |
setAbilityID(java.lang.String ID) |
Sets the ability ID that this component serves.
|
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 |
setTriggererDef(java.lang.String def) |
Sets the raw triggering ritual definition string to execute
this ability for which this component exists.
|
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.
|
public java.lang.String ID()
CMObjectpublic java.lang.String name()
CMObjectname in interface CMObjectEnvironmental.Name()public int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public CMObject newInstance()
CMObjectnewInstance in interface CMObjectpublic void initializeClass()
CMObjectinitializeClass in interface CMObjectpublic CMObject copyOf()
CMObjectpublic java.lang.String getAbilityID()
AbilityComponentgetAbilityID in interface AbilityComponentAbilityComponent.setAbilityID(String)public void setAbilityID(java.lang.String ID)
AbilityComponentsetAbilityID in interface AbilityComponentID - the ability IDAbilityComponent.getAbilityID()public AbilityComponent.CompConnector getConnector()
AbilityComponentgetConnector in interface AbilityComponentAbilityComponent.CompConnector,
AbilityComponent.setConnector(CompConnector)public void setConnector(AbilityComponent.CompConnector connector)
AbilityComponentsetConnector in interface AbilityComponentconnector - a connector enumAbilityComponent.CompConnector,
AbilityComponent.getConnector()public AbilityComponent.CompLocation getLocation()
AbilityComponentgetLocation in interface AbilityComponentAbilityComponent.CompLocation,
AbilityComponent.setLocation(CompLocation)public void setLocation(AbilityComponent.CompLocation location)
AbilityComponentsetLocation in interface AbilityComponentlocation - where an item must be to be a componentAbilityComponent.CompLocation,
AbilityComponent.getLocation()public boolean isConsumed()
AbilityComponentisConsumed in interface AbilityComponentAbilityComponent.setConsumed(boolean)public void setConsumed(boolean isConsumed)
AbilityComponentsetConsumed in interface AbilityComponentisConsumed - true if consumed, false otherwiseAbilityComponent.isConsumed()public int getAmount()
AbilityComponentgetAmount in interface AbilityComponentAbilityComponent.setAmount(int)public void setAmount(int amount)
AbilityComponentsetAmount in interface AbilityComponentamount - the number of items matching this component which must be presentAbilityComponent.getAmount()public MaskingLibrary.CompiledZMask getCompiledMask()
AbilityComponentgetCompiledMask in interface AbilityComponentAbilityComponent.getMaskStr(),
AbilityComponent.setMask(String),
MaskingLibrarypublic java.lang.String getMaskStr()
AbilityComponentgetMaskStr in interface AbilityComponentAbilityComponent.getCompiledMask(),
AbilityComponent.setMask(String),
MaskingLibrarypublic void setMask(java.lang.String maskStr)
AbilityComponentsetMask in interface AbilityComponentmaskStr - the raw zapper maskAbilityComponent.getCompiledMask(),
AbilityComponent.getMaskStr(),
MaskingLibrarypublic AbilityComponent.CompType getType()
AbilityComponentgetType in interface AbilityComponentAbilityComponent.CompType,
AbilityComponent.setType(CompType, Object, String)public void setType(AbilityComponent.CompType type, java.lang.Object typeObj, java.lang.String subType)
AbilityComponentsetType 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()
AbilityComponentgetLongType in interface AbilityComponentAbilityComponent.setType(CompType, Object, String)public java.lang.String getStringType()
AbilityComponentgetStringType in interface AbilityComponentAbilityComponent.setType(CompType, Object, String)public java.lang.String getSubType()
AbilityComponentgetSubType in interface AbilityComponentAbilityComponent.CompType,
AbilityComponent.setType(CompType, Object, String)public java.lang.String getTriggererDef()
AbilityComponentgetTriggererDef in interface AbilityComponentAbilityComponent.setTriggererDef(String)public void setTriggererDef(java.lang.String def)
AbilityComponentsetTriggererDef in interface AbilityComponentdef - the triggering ritual encoding definition string for this componentAbilityComponent.getTriggererDef()