Genericize
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@564 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -27,11 +27,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.samskivert.io.PersistenceException;
|
||||
import com.samskivert.util.HashIntMap;
|
||||
import com.samskivert.util.Invoker;
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
import com.threerings.media.util.AStarPathUtil;
|
||||
import com.threerings.media.util.MathUtil;
|
||||
import com.threerings.miso.data.ObjectInfo;
|
||||
@@ -356,8 +352,7 @@ public class StageSceneManager extends SpotSceneManager
|
||||
}
|
||||
|
||||
// if they are already standing on this tile, allow it
|
||||
SceneLocation cloc = (SceneLocation)
|
||||
_ssobj.occupantLocs.get(Integer.valueOf(source.getOid()));
|
||||
SceneLocation cloc = _ssobj.occupantLocs.get(Integer.valueOf(source.getOid()));
|
||||
if (cloc != null) {
|
||||
StageLocation sloc = (StageLocation) cloc.loc;
|
||||
if (MisoUtil.fullToTile(sloc.x) == tx &&
|
||||
@@ -713,8 +708,7 @@ public class StageSceneManager extends SpotSceneManager
|
||||
/** Helper function for {@link #bodyAdded}. */
|
||||
protected void positionBody (Cluster cl, int bodyOid, ArrayList locs)
|
||||
{
|
||||
SceneLocation sloc = (SceneLocation)
|
||||
_ssobj.occupantLocs.get(Integer.valueOf(bodyOid));
|
||||
SceneLocation sloc = _ssobj.occupantLocs.get(Integer.valueOf(bodyOid));
|
||||
if (sloc == null) {
|
||||
BodyObject user = (BodyObject)StageServer.omgr.getObject(bodyOid);
|
||||
String who = (user == null) ? ("" + bodyOid) : user.who();
|
||||
|
||||
@@ -39,10 +39,10 @@ public class SpotSceneObject extends SceneObject
|
||||
|
||||
/** A distributed set containing {@link SceneLocation} records for all
|
||||
* occupants of this scene. */
|
||||
public DSet occupantLocs = new DSet();
|
||||
public DSet<SceneLocation> occupantLocs = new DSet<SceneLocation>();
|
||||
|
||||
/** Contains information on all {@link Cluster}s in this scene. */
|
||||
public DSet clusters = new DSet();
|
||||
public DSet<Cluster> clusters = new DSet<Cluster>();
|
||||
|
||||
// AUTO-GENERATED: METHODS START
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ public class SpotSceneObject extends SceneObject
|
||||
* <code>occupantLocs</code> set. The set will not change until the event is
|
||||
* actually propagated through the system.
|
||||
*/
|
||||
public void addToOccupantLocs (DSet.Entry elem)
|
||||
public void addToOccupantLocs (SceneLocation elem)
|
||||
{
|
||||
requestEntryAdd(OCCUPANT_LOCS, occupantLocs, elem);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class SpotSceneObject extends SceneObject
|
||||
* <code>occupantLocs</code> set. The set will not change until the event is
|
||||
* actually propagated through the system.
|
||||
*/
|
||||
public void updateOccupantLocs (DSet.Entry elem)
|
||||
public void updateOccupantLocs (SceneLocation elem)
|
||||
{
|
||||
requestEntryUpdate(OCCUPANT_LOCS, occupantLocs, elem);
|
||||
}
|
||||
@@ -85,10 +85,10 @@ public class SpotSceneObject extends SceneObject
|
||||
* change. Proxied copies of this object (on clients) will apply the
|
||||
* value change when they received the attribute changed notification.
|
||||
*/
|
||||
public void setOccupantLocs (DSet value)
|
||||
public void setOccupantLocs (DSet<com.threerings.whirled.spot.data.SceneLocation> value)
|
||||
{
|
||||
requestAttributeChange(OCCUPANT_LOCS, value, this.occupantLocs);
|
||||
@SuppressWarnings("unchecked") DSet clone =
|
||||
@SuppressWarnings("unchecked") DSet<com.threerings.whirled.spot.data.SceneLocation> clone =
|
||||
(value == null) ? null : value.typedClone();
|
||||
this.occupantLocs = clone;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class SpotSceneObject extends SceneObject
|
||||
* <code>clusters</code> set. The set will not change until the event is
|
||||
* actually propagated through the system.
|
||||
*/
|
||||
public void addToClusters (DSet.Entry elem)
|
||||
public void addToClusters (Cluster elem)
|
||||
{
|
||||
requestEntryAdd(CLUSTERS, clusters, elem);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class SpotSceneObject extends SceneObject
|
||||
* <code>clusters</code> set. The set will not change until the event is
|
||||
* actually propagated through the system.
|
||||
*/
|
||||
public void updateClusters (DSet.Entry elem)
|
||||
public void updateClusters (Cluster elem)
|
||||
{
|
||||
requestEntryUpdate(CLUSTERS, clusters, elem);
|
||||
}
|
||||
@@ -133,10 +133,10 @@ public class SpotSceneObject extends SceneObject
|
||||
* change. Proxied copies of this object (on clients) will apply the
|
||||
* value change when they received the attribute changed notification.
|
||||
*/
|
||||
public void setClusters (DSet value)
|
||||
public void setClusters (DSet<com.threerings.whirled.spot.data.Cluster> value)
|
||||
{
|
||||
requestAttributeChange(CLUSTERS, value, this.clusters);
|
||||
@SuppressWarnings("unchecked") DSet clone =
|
||||
@SuppressWarnings("unchecked") DSet<com.threerings.whirled.spot.data.Cluster> clone =
|
||||
(value == null) ? null : value.typedClone();
|
||||
this.clusters = clone;
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ public class SpotSceneManager extends SceneManager
|
||||
*/
|
||||
protected SceneLocation locationForBody (int bodyOid)
|
||||
{
|
||||
return (SceneLocation)_ssobj.occupantLocs.get(Integer.valueOf(bodyOid));
|
||||
return _ssobj.occupantLocs.get(Integer.valueOf(bodyOid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user