net.sf.mud4j.effect
Class AbstractItemEffect

java.lang.Object
  extended by net.sf.mud4j.effect.AbstractEffect
      extended by net.sf.mud4j.effect.AbstractItemEffect
All Implemented Interfaces:
Effect, ItemEffect

public class AbstractItemEffect
extends AbstractEffect
implements ItemEffect

Abstract item effect imlementation to implement all necessary functionality for an extending class to use and implement business item effect data. Extending from this class will provide the class with core item effect functionality.

Author:
Matthew Purland

Constructor Summary
AbstractItemEffect(Item item)
           
 
Method Summary
 void apply()
          Apply effect on the target.
 boolean isPermanent()
          Determine if the effect is permanent.
 void setItem(Item item)
          Set the effect to use the specified item.
 void undo()
          Undo the effect from the target.
 
Methods inherited from class net.sf.mud4j.effect.AbstractEffect
getName, hasExpired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.mud4j.effect.Effect
getName, hasExpired
 

Constructor Detail

AbstractItemEffect

public AbstractItemEffect(Item item)
Method Detail

setItem

public void setItem(Item item)
Set the effect to use the specified item.

Specified by:
setItem in interface ItemEffect
Parameters:
item - Item that the effect will use.

apply

public void apply()
           throws EffectException
Apply effect on the target.

Specified by:
apply in interface Effect
Specified by:
apply in class AbstractEffect
Throws:
EffectException

undo

public void undo()
          throws EffectException
Undo the effect from the target.

Specified by:
undo in interface Effect
Specified by:
undo in class AbstractEffect
Throws:
EffectException

isPermanent

public boolean isPermanent()
Determine if the effect is permanent. Permanent status means that the effect cannot be removed.

Specified by:
isPermanent in interface Effect


Copyright © 2006-2007 mud4j. All Rights Reserved.