Added toString().

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@815 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-12-17 00:58:04 +00:00
parent 661f63373b
commit ae5ab433a1
2 changed files with 22 additions and 2 deletions
@@ -1,5 +1,5 @@
//
// $Id: SceneSummary.java,v 1.1 2001/12/04 00:31:58 mdb Exp $
// $Id: SceneSummary.java,v 1.2 2001/12/17 00:58:04 mdb Exp $
package com.threerings.whirled.zone.data;
@@ -7,6 +7,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import com.samskivert.util.StringUtil;
import com.threerings.presents.io.Streamable;
import com.threerings.presents.io.StreamableUtil;
@@ -66,6 +67,15 @@ public class SceneSummary implements Streamable
_population = in.readInt();
}
/**
* Generates a string representation of this instance.
*/
public String toString ()
{
return "[sceneId=" + sceneId + ", name=" + name +
", neighbors=" + StringUtil.toString(neighbors) + "]";
}
/** The number of people currently occupying this scene. */
protected int _population;
}
@@ -1,5 +1,5 @@
//
// $Id: ZoneSummary.java,v 1.2 2001/12/13 05:49:50 mdb Exp $
// $Id: ZoneSummary.java,v 1.3 2001/12/17 00:58:04 mdb Exp $
package com.threerings.whirled.zone.data;
@@ -7,6 +7,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import com.samskivert.util.StringUtil;
import com.threerings.presents.io.Streamable;
/**
@@ -51,4 +52,13 @@ public class ZoneSummary implements Streamable
scenes[i].readFrom(in);
}
}
/**
* Generates a string representation of this instance.
*/
public String toString ()
{
return "[zoneId=" + zoneId + ", name=" + name +
", scenes=" + StringUtil.toString(scenes) + "]";
}
}