Class Horolog

java.lang.Object
  |
  +--GameObject
        |
        +--RealObject
              |
              +--Horolog
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, Spyable

class Horolog
extends RealObject

This class displays the current game time as part of its description. #see MasterGame#masterTime


Inner classes inherited from class RealObject
RealObject.ContentsMessager, RealObject.DescriptionLineProcessor
 
Inner classes inherited from class GameObject
GameObject.LeaveInfo
 
Field Summary
protected  java.text.SimpleDateFormat formatter
          a date formatter built from the initializer specifications
 
Fields inherited from class RealObject
contents, longDescription, parentObject, shortDescription, spreadto
 
Fields inherited from class GameObject
masterGame, name
 
Constructor Summary
(package private) Horolog()
           
 
Method Summary
 java.lang.String getLongDescription()
          Use the regular long description for the object but substitute the formatted time for an at sign.
 void initialize(java.lang.String initializer, GameObject parentObjectArg)
          Initialize with the usual arguments, plus mobility
 
Methods inherited from class RealObject
checkLeave, clone, doAction, getParent, getShortDescription, getSpreadability, goodbye, hello, isPredicate, preClone, register, roomOf, runSpy, setParent, spread, tellAll, unregister, wanderVia
 
Methods inherited from class GameObject
announce, compareTo, getMasterGame, kill, listen, newInstance, setMasterGame, toString
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

formatter

protected java.text.SimpleDateFormat formatter
a date formatter built from the initializer specifications
Constructor Detail

Horolog

Horolog()
Method Detail

getLongDescription

public java.lang.String getLongDescription()
Use the regular long description for the object but substitute the formatted time for an at sign.
Overrides:
getLongDescription in class RealObject
Returns:
the description and time, such as "A jeweled wristwatch displays the time as 4:12:17.22pm."

initialize

public void initialize(java.lang.String initializer,
                       GameObject parentObjectArg)
                throws GameException
Initialize with the usual arguments, plus mobility
Overrides:
initialize in class RealObject
Parameters:
initializer - adds a fourth tilde piece with a number indicating