From 74ebb4a21e9b67ad98ae8c8f04e97c56a803f267 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 21 Jan 2003 01:08:10 +0000 Subject: [PATCH] Added toString(). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2201 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/crowd/chat/data/ChatMessage.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/crowd/chat/data/ChatMessage.java b/src/java/com/threerings/crowd/chat/data/ChatMessage.java index 282ae2078..a5a6fcf81 100644 --- a/src/java/com/threerings/crowd/chat/data/ChatMessage.java +++ b/src/java/com/threerings/crowd/chat/data/ChatMessage.java @@ -1,8 +1,10 @@ // -// $Id: ChatMessage.java,v 1.1 2002/07/26 20:35:01 ray Exp $ +// $Id: ChatMessage.java,v 1.2 2003/01/21 01:08:10 mdb Exp $ package com.threerings.crowd.chat; +import com.samskivert.util.StringUtil; + /** * The abstract base class of all the client-side ChatMessage objects. */ @@ -27,4 +29,13 @@ public abstract class ChatMessage this.localtype = localtype; timestamp = System.currentTimeMillis(); } + + /** + * Generates a string representation of this instance. + */ + public String toString () + { + return StringUtil.shortClassName(this) + "[msg=" + message + + ", type=" + localtype + ", stamp=" + timestamp + "]"; + } }