net.sf.mud4j.world.item
Class AbstractItem

java.lang.Object
  extended by net.sf.mud4j.world.item.AbstractItem
All Implemented Interfaces:
Effectable, Item

public class AbstractItem
extends java.lang.Object
implements Item

Abstract implementation for an item type.

Author:
Matthew Purland

Constructor Summary
AbstractItem()
           
 
Method Summary
 EffectBehavior getEffectBehavior()
          Get effect behavior to handle effects.
 java.lang.String getName()
          Get the name of the item.
 java.util.List<ItemType> getTypes()
          Get list of item types for the item.
 void setEffectBehavior(EffectBehavior effectBehavior)
          Set effect behavior on the effectable object.
 void setName(java.lang.String newItemName)
          Set the name of the item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractItem

public AbstractItem()
Method Detail

getName

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

Specified by:
getName in interface Item
Returns:
Returns the name of the item.

setName

public void setName(java.lang.String newItemName)
Set the name of the item.

Specified by:
setName in interface Item
Parameters:
newItemName - New item name for the item.

getTypes

public java.util.List<ItemType> getTypes()
Get list of item types for the item. An item should be able to have multiple item types.

Specified by:
getTypes in interface Item
Returns:
Returns list of item types for the given item.

getEffectBehavior

public EffectBehavior getEffectBehavior()
Get effect behavior to handle effects.

Specified by:
getEffectBehavior in interface Effectable
Returns:
Returns the effect behavior.

setEffectBehavior

public void setEffectBehavior(EffectBehavior effectBehavior)
Set effect behavior on the effectable object.

Specified by:
setEffectBehavior in interface Effectable


Copyright © 2006-2007 mud4j. All Rights Reserved.