|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcmsc433.p1.LogRecord
public class LogRecord
A LogRecord describes a logged event. A LogRecord consists of an event name, an event identifier number, and the time at which the event took place. The identifier number is taken from an internal counter, which starts at 0 and is incremented each time a LogRecord is created. LogRecords are immutable. That is, once created, they are never changed. This class should be thread-safe.
| Constructor Summary | |
|---|---|
LogRecord(java.lang.String event)
Constructor specifying a string description of an event; events are not allowed to contain "newlines" \n. |
|
| Method Summary | |
|---|---|
java.lang.String |
getEvent()
Returns the event portion of the LogRecord. |
java.util.Date |
getTimestamp()
Returns the time when this LogRecord was created. |
java.lang.String |
toString()
Creates a string representation of the LogRecord suitable for printing. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LogRecord(java.lang.String event)
| Method Detail |
|---|
public java.lang.String getEvent()
public java.util.Date getTimestamp()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||