heurgame.logging
Class LogItem

java.lang.Object
  extended byheurgame.logging.LogItem
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class LogItem
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Author:
David Kaplin Encapsulates an item in a log.
See Also:
Serialized Form

Field Summary
 java.lang.String longDescription
           
 int priority
          Positive numbers, the higher the better priority
 java.lang.String shortDescription
           
 
Constructor Summary
LogItem(java.lang.String shortDesc, java.lang.String longDesc)
          Creates a normal Log Entry
LogItem(java.lang.String shortDesc, java.lang.String longDesc, int priority)
          Creates a new LogItem with a specific priority.
 
Method Summary
 java.util.Date getTime()
           
 java.lang.String getWho()
          Returns the name of the author of the log
protected  void setOwner(java.lang.String w)
          This method should only be called by objects of type Log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shortDescription

public java.lang.String shortDescription

longDescription

public java.lang.String longDescription

priority

public int priority
Positive numbers, the higher the better priority

Constructor Detail

LogItem

public LogItem(java.lang.String shortDesc,
               java.lang.String longDesc)
Creates a normal Log Entry

Parameters:
shortDesc - One line description of the event.
longDesc - Detailed description of the event.

LogItem

public LogItem(java.lang.String shortDesc,
               java.lang.String longDesc,
               int priority)
Creates a new LogItem with a specific priority.

Parameters:
shortDesc - One line description of the event.
longDesc - Detailed description of the event.
priority - Positive Integers get a higher priority
Method Detail

setOwner

protected void setOwner(java.lang.String w)
This method should only be called by objects of type Log. DO NOT SET THIS WITH A LogWriter.

Parameters:
w - Name of the responsible component.

getWho

public java.lang.String getWho()
Returns the name of the author of the log

Returns:
Name of the responsible component.

getTime

public java.util.Date getTime()
Returns:
Time this item was written by the author