Files
narya/tests/src/java/com/threerings/presents/server/TestObject.dobj
T
Michael Bayne 99a0730696 First pass at moving all of Narya test stuff into the tests directory.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@598 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-11-08 02:07:36 +00:00

58 lines
1.3 KiB
Plaintext

//
// $Id: TestObject.dobj,v 1.5 2001/11/08 02:07:36 mdb Exp $
package com.threerings.presents.server;
import com.threerings.presents.dobj.*;
/**
* I use this to test until I get the actual DObject generation script
* working.
*/
public class TestObject extends DObject
{
public static final String FOO = "foo";
public static final String BAR = "bar";
public static final String LIST = "list";
public int foo;
public String bar;
public OidList list = new OidList();
public void setFoo (int foo)
{
requestAttributeChange(FOO, new Integer(foo));
}
public void setBar (String bar)
{
requestAttributeChange(BAR, bar);
}
/**
* Requests that the specified oid be added to the
* <code>list</code> oid list.
*/
public void addToList (int oid)
{
requestOidAdd(LIST, oid);
}
/**
* Requests that the specified oid be removed from the
* <code>list</code> oid list.
*/
public void removeFromList (int oid)
{
requestOidRemove(LIST, oid);
}
protected void toString (StringBuffer buf)
{
super.toString(buf);
buf.append(", foo=").append(foo);
buf.append(", bar=").append(bar);
buf.append(", list=").append(list);
}
}