Modified toString() to be extensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@150 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: PlaceObject.dobj,v 1.3 2001/08/02 05:10:30 mdb Exp $
|
||||
// $Id: PlaceObject.dobj,v 1.4 2001/08/02 06:01:13 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.party.data;
|
||||
|
||||
@@ -33,4 +33,10 @@ public class PlaceObject extends DObject
|
||||
{
|
||||
requestOidRemove(OCCUPANTS, oid);
|
||||
}
|
||||
|
||||
protected void toString (StringBuffer buf)
|
||||
{
|
||||
super.toString(buf);
|
||||
buf.append(", occupants=").append(occupants);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: DObject.java,v 1.16 2001/08/02 04:49:08 mdb Exp $
|
||||
// $Id: DObject.java,v 1.17 2001/08/02 06:01:12 mdb Exp $
|
||||
|
||||
package com.threerings.cocktail.cher.dobj;
|
||||
|
||||
@@ -255,7 +255,16 @@ public class DObject
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return "[oid=" + _oid + "]";
|
||||
StringBuffer buf = new StringBuffer();
|
||||
buf.append("[");
|
||||
toString(buf);
|
||||
buf.append("]");
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
protected void toString (StringBuffer buf)
|
||||
{
|
||||
buf.append("oid=").append(_oid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user