Added a StringUtil Formatter for printing out only the user oid and
location id from an occupantInfo set. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1515 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
//
|
//
|
||||||
// $Id: SpotOccupantInfo.java,v 1.2 2002/04/17 22:19:40 mdb Exp $
|
// $Id: SpotOccupantInfo.java,v 1.3 2002/06/20 22:13:20 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.spot.data;
|
package com.threerings.whirled.spot.data;
|
||||||
|
|
||||||
|
import com.samskivert.util.StringUtil.Formatter;
|
||||||
|
|
||||||
import com.threerings.crowd.data.OccupantInfo;
|
import com.threerings.crowd.data.OccupantInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,4 +16,13 @@ public class SpotOccupantInfo extends OccupantInfo
|
|||||||
/** The id of the location occupied by this user or -1 if they occupy
|
/** The id of the location occupied by this user or -1 if they occupy
|
||||||
* no location. */
|
* no location. */
|
||||||
public int locationId;
|
public int locationId;
|
||||||
|
|
||||||
|
/** Used to log just the user oids and location ids of users in the
|
||||||
|
* <code>occupantInfo</code> set when debugging. */
|
||||||
|
public static final Formatter OIDS_AND_LOCS = new Formatter() {
|
||||||
|
public String toString (Object object) {
|
||||||
|
SpotOccupantInfo soi = (SpotOccupantInfo)object;
|
||||||
|
return "[" + soi.getBodyOid() + ", " + soi.locationId + "]";
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user