Fixed a bunch of type safety bits pointed out by the latest version of Eclipse.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5274 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -57,7 +57,7 @@ import com.threerings.crowd.util.CrowdContext;
|
||||
* what's in the cache.
|
||||
*/
|
||||
public class OccupantDirector extends BasicDirector
|
||||
implements LocationObserver, SetListener
|
||||
implements LocationObserver, SetListener<OccupantInfo>
|
||||
{
|
||||
/**
|
||||
* Constructs a new occupant director with the supplied context.
|
||||
@@ -148,7 +148,7 @@ public class OccupantDirector extends BasicDirector
|
||||
/**
|
||||
* Deals with all of the processing when an occupant shows up.
|
||||
*/
|
||||
public void entryAdded (EntryAddedEvent event)
|
||||
public void entryAdded (EntryAddedEvent<OccupantInfo> event)
|
||||
{
|
||||
// bail if this isn't for the OCCUPANT_INFO field
|
||||
if (!event.getName().equals(PlaceObject.OCCUPANT_INFO)) {
|
||||
@@ -156,7 +156,7 @@ public class OccupantDirector extends BasicDirector
|
||||
}
|
||||
|
||||
// now let the occupant observers know what's up
|
||||
final OccupantInfo info = (OccupantInfo)event.getEntry();
|
||||
final OccupantInfo info = event.getEntry();
|
||||
_observers.apply(new ObserverList.ObserverOp<OccupantObserver>() {
|
||||
public boolean apply (OccupantObserver observer) {
|
||||
observer.occupantEntered(info);
|
||||
@@ -168,7 +168,7 @@ public class OccupantDirector extends BasicDirector
|
||||
/**
|
||||
* Deals with all of the processing when an occupant is updated.
|
||||
*/
|
||||
public void entryUpdated (EntryUpdatedEvent event)
|
||||
public void entryUpdated (EntryUpdatedEvent<OccupantInfo> event)
|
||||
{
|
||||
// bail if this isn't for the OCCUPANT_INFO field
|
||||
if (!event.getName().equals(PlaceObject.OCCUPANT_INFO)) {
|
||||
@@ -176,8 +176,8 @@ public class OccupantDirector extends BasicDirector
|
||||
}
|
||||
|
||||
// now let the occupant observers know what's up
|
||||
final OccupantInfo info = (OccupantInfo)event.getEntry();
|
||||
final OccupantInfo oinfo = (OccupantInfo)event.getOldEntry();
|
||||
final OccupantInfo info = event.getEntry();
|
||||
final OccupantInfo oinfo = event.getOldEntry();
|
||||
_observers.apply(new ObserverList.ObserverOp<OccupantObserver>() {
|
||||
public boolean apply (OccupantObserver observer) {
|
||||
observer.occupantUpdated(oinfo, info);
|
||||
@@ -189,7 +189,7 @@ public class OccupantDirector extends BasicDirector
|
||||
/**
|
||||
* Deals with all of the processing when an occupant leaves.
|
||||
*/
|
||||
public void entryRemoved (EntryRemovedEvent event)
|
||||
public void entryRemoved (EntryRemovedEvent<OccupantInfo> event)
|
||||
{
|
||||
// bail if this isn't for the OCCUPANT_INFO field
|
||||
if (!event.getName().equals(PlaceObject.OCCUPANT_INFO)) {
|
||||
@@ -197,7 +197,7 @@ public class OccupantDirector extends BasicDirector
|
||||
}
|
||||
|
||||
// let the occupant observers know what's up
|
||||
final OccupantInfo oinfo = (OccupantInfo)event.getOldEntry();
|
||||
final OccupantInfo oinfo = event.getOldEntry();
|
||||
_observers.apply(new ObserverList.ObserverOp<OccupantObserver>() {
|
||||
public boolean apply (OccupantObserver observer) {
|
||||
observer.occupantLeft(oinfo);
|
||||
@@ -207,8 +207,7 @@ public class OccupantDirector extends BasicDirector
|
||||
}
|
||||
|
||||
/** The occupant observers to keep abreast of occupant antics. */
|
||||
protected ObserverList<OccupantObserver> _observers =
|
||||
new ObserverList<OccupantObserver>(ObserverList.SAFE_IN_ORDER_NOTIFY);
|
||||
protected ObserverList<OccupantObserver> _observers = ObserverList.newSafeInOrder();
|
||||
|
||||
/** The user's current location. */
|
||||
protected PlaceObject _place;
|
||||
|
||||
Reference in New Issue
Block a user