Serialization jockeying.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@720 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-11-30 21:54:34 +00:00
parent 64be43162e
commit 7d108a256f
2 changed files with 72 additions and 22 deletions
@@ -1,5 +1,5 @@
//
// $Id: SceneModel.java,v 1.3 2001/11/29 19:32:06 mdb Exp $
// $Id: SceneModel.java,v 1.4 2001/11/30 21:54:34 mdb Exp $
package com.threerings.whirled.data;
@@ -62,26 +62,6 @@ public class SceneModel implements Streamable
}
}
/**
* Creates and returns a blank scene model.
*/
public static SceneModel blankSceneModel ()
{
SceneModel model = new SceneModel();
populateBlankSceneModel(model);
return model;
}
/**
* Populates a blank scene model with blank values.
*/
protected static void populateBlankSceneModel (SceneModel model)
{
model.sceneId = -1;
model.version = 0;
model.neighborIds = new int[0];
}
/**
* Generates a string representation of this scene model.
*/
@@ -102,4 +82,24 @@ public class SceneModel implements Streamable
buf.append(", version=").append(version);
buf.append(", neighborIds=").append(StringUtil.toString(neighborIds));
}
/**
* Creates and returns a blank scene model.
*/
public static SceneModel blankSceneModel ()
{
SceneModel model = new SceneModel();
populateBlankSceneModel(model);
return model;
}
/**
* Populates a blank scene model with blank values.
*/
protected static void populateBlankSceneModel (SceneModel model)
{
model.sceneId = -1;
model.version = 0;
model.neighborIds = new int[0];
}
}