mstar
Class MudObject

java.lang.Object
  |
  +--mstar.MudObject
Direct Known Subclasses:
MudPlayer

public class MudObject
extends java.lang.Object
implements java.io.Serializable

MudObject is a base class that is used to model rooms, players and other objects in the collaborative environment. If has fields for the name of the object, its database reference, description, numeric identifier and the date and time it was first encountered, and the date and time it was last encountered.

See Also:
Serialized Form

Constructor Summary
MudObject()
          Create a MUD object with the first encounter time set.
MudObject(java.lang.String name)
          Create a MUD object with the name of the object and the first encounter time set.
 
Method Summary
 boolean equals(MudObject m)
           
 java.lang.String getDBReference()
          This routine gets the database reference for this object.
 java.lang.String getDescription()
          This routine gets the description for this object.
 java.util.GregorianCalendar getFirstEncounter()
          This routine gets the time that this object was first encountered.
 int getId()
          This routine gets the numeric identifier for this object.
 java.util.GregorianCalendar getLastEncounter()
          This routine gets the last time that this object was encountered.
 java.lang.String getName()
          This routine gets the name of this object.
 void setDBReference(java.lang.String dbReference)
          This routine sets the database reference for this object.
 void setDescription(java.lang.String description)
          This routine sets the description for this object.
 void setFirstEncounter(java.util.GregorianCalendar firstIn)
          This routine sets the time that this object was first encountered.
 void setId(int id)
          Sets the numeric identifier for this object.
 void setLastEncounter(java.util.GregorianCalendar lastEncounter)
          This routine sets the last time that this object was encountered.
 void setName(java.lang.String name)
          This routine sets the name of this object.
 java.lang.String toMap()
          This routine returns the String that represents this object in MAAS-Neotek format.
 java.lang.String toString()
          This routine returns the String representation for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MudObject

public MudObject()
Create a MUD object with the first encounter time set.

MudObject

public MudObject(java.lang.String name)
Create a MUD object with the name of the object and the first encounter time set.
Parameters:
name - the name of the object.
Method Detail

setId

public void setId(int id)
Sets the numeric identifier for this object.
Parameters:
id - the numeric identifier for this object.

getId

public int getId()
This routine gets the numeric identifier for this object. This identifier is used to uniquely identify this object from other similar object.

setName

public void setName(java.lang.String name)
This routine sets the name of this object.
Parameters:
name - -- the name of this object. This is generally derived from the object description returned by the Mud/MOO.

getName

public java.lang.String getName()
This routine gets the name of this object.

setDBReference

public void setDBReference(java.lang.String dbReference)
This routine sets the database reference for this object. The database reference is sometimes available from the description that the Mud/MOO returns.
Parameters:
dbReference - -- the database reference for this object.

getDBReference

public java.lang.String getDBReference()
This routine gets the database reference for this object.

setDescription

public void setDescription(java.lang.String description)
This routine sets the description for this object. The description, when available, is returned from the description that the Mud/MOO returns.
Parameters:
description - -- the description of this object.

getDescription

public java.lang.String getDescription()
This routine gets the description for this object.

equals

public boolean equals(MudObject m)

toString

public java.lang.String toString()
This routine returns the String representation for this object.
Overrides:
toString in class java.lang.Object

toMap

public java.lang.String toMap()
This routine returns the String that represents this object in MAAS-Neotek format.

setFirstEncounter

public void setFirstEncounter(java.util.GregorianCalendar firstIn)
This routine sets the time that this object was first encountered.
Parameters:
firstIn - -- the time this object was first encountered.

getFirstEncounter

public java.util.GregorianCalendar getFirstEncounter()
This routine gets the time that this object was first encountered.

setLastEncounter

public void setLastEncounter(java.util.GregorianCalendar lastEncounter)
This routine sets the last time that this object was encountered.
Parameters:
lastIn - -- the time this object was last encountered.

getLastEncounter

public java.util.GregorianCalendar getLastEncounter()
This routine gets the last time that this object was encountered.