net.sf.mud4j.effect
Class AbstractEffect

java.lang.Object
  extended by net.sf.mud4j.effect.AbstractEffect
All Implemented Interfaces:
Effect
Direct Known Subclasses:
AbstractCharacterEffect, AbstractItemEffect

public abstract class AbstractEffect
extends java.lang.Object
implements Effect

Abstract implementation for effects.

Author:
Matthew Purland

Constructor Summary
AbstractEffect()
           
AbstractEffect(java.lang.String effectName)
           
 
Method Summary
abstract  void apply()
          Apply effect on the target.
 java.lang.String getName()
          Get name of the effect
 boolean hasExpired()
          Determine if the effect has expired duration.
abstract  void undo()
          Undo the effect from the target.
 
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
isPermanent
 

Constructor Detail

AbstractEffect

public AbstractEffect()

AbstractEffect

public AbstractEffect(java.lang.String effectName)
Method Detail

getName

public java.lang.String getName()
Get name of the effect

Specified by:
getName in interface Effect

hasExpired

public boolean hasExpired()
Determine if the effect has expired duration.

Specified by:
hasExpired in interface Effect
Returns:
Returns whether the effect has expired yet.

undo

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

Specified by:
undo in interface Effect
Throws:
EffectException

apply

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

Specified by:
apply in interface Effect
Throws:
EffectException


Copyright © 2006-2007 mud4j. All Rights Reserved.