com.planet_ink.coffee_mud.Common
Class DefaultTattoo

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.DefaultTattoo
All Implemented Interfaces:
CMCommon, Tattoo, CMObject, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class DefaultTattoo
extends java.lang.Object
implements Tattoo


Constructor Summary
DefaultTattoo()
           
 
Method Summary
 int compareTo(CMObject o)
           
 Tattoo 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 getTattooName()
          Returns the tattoo Name
 int getTickDown()
          Returns the current tick-down
 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.
 java.lang.String name()
          The displayable name of this object.
 CMObject newInstance()
          Returns a new instance of this class.
 Tattoo parse(java.lang.String tattooCode)
          Parse a new tattoo object from the coded data, of the form: TATOONAME or NUMBER TATTOONAME
 Tattoo set(java.lang.String name)
          Set the tattoo name
 Tattoo set(java.lang.String name, int down)
          Set the tatoo name and tick-down
 int tickDown()
          Reduces the tick down by one and returns the new value
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultTattoo

public DefaultTattoo()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

name

public java.lang.String name()
Description copied from interface: CMObject
The displayable name of this object. May be modified by phyStats() object. Is derived from the Name().

Specified by:
name in interface CMObject
Returns:
the modified final name of this object on the map.
See Also:
Environmental.Name()

set

public Tattoo set(java.lang.String name)
Description copied from interface: Tattoo
Set the tattoo name

Specified by:
set in interface Tattoo
Parameters:
name - the tattoo name
Returns:
this

set

public Tattoo set(java.lang.String name,
                  int down)
Description copied from interface: Tattoo
Set the tatoo name and tick-down

Specified by:
set in interface Tattoo
Parameters:
name - the tatoo name
down - the tick down life span
Returns:
this

getTickDown

public final int getTickDown()
Description copied from interface: Tattoo
Returns the current tick-down

Specified by:
getTickDown in interface Tattoo
Returns:
the tickDown

getTattooName

public final java.lang.String getTattooName()
Description copied from interface: Tattoo
Returns the tattoo Name

Specified by:
getTattooName in interface Tattoo
Returns:
the tattooName

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

copyOf

public Tattoo copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

tickDown

public int tickDown()
Description copied from interface: Tattoo
Reduces the tick down by one and returns the new value

Specified by:
tickDown in interface Tattoo
Returns:
the new tick down

parse

public Tattoo parse(java.lang.String tattooCode)
Description copied from interface: Tattoo
Parse a new tattoo object from the coded data, of the form: TATOONAME or NUMBER TATTOONAME

Specified by:
parse in interface Tattoo
Parameters:
tattooCode - coded data
Returns:
this tattoo