|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--rescuecore.FilterMemoryListener
This class will filter which events get passed to a MemoryListener
| Field Summary | |
static int |
MODE_CLASS
|
static int |
MODE_INTERNAL_TYPE
|
static int |
MODE_TYPE
|
| Method Summary | |
static MemoryListener |
createClassFilter(java.lang.Class clazz,
MemoryListener l)
Create a new FilterMemoryListener that will only pass on notifications that concern RescueObjects of a particular class |
static MemoryListener |
createInternalTypeFilter(int type,
MemoryListener l)
Create a new FilterMemoryListener that will only pass on notifications that concern RescueObjects of a particular internal type |
static MemoryListener |
createTypeFilter(int type,
MemoryListener l)
Create a new FilterMemoryListener that will only pass on notifications that concern RescueObjects of a particular type |
void |
objectAdded(RescueObject o,
int time)
Notification that an object has been added to the memory |
void |
objectChanged(RescueObject o,
int property,
int time)
Notification that an object in the memory has been changed |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MODE_CLASS
public static final int MODE_TYPE
public static final int MODE_INTERNAL_TYPE
| Method Detail |
public static MemoryListener createClassFilter(java.lang.Class clazz,
MemoryListener l)
clazz - The Class we are interested inl - The MemoryListener to pass qualifying updates down to
public static MemoryListener createTypeFilter(int type,
MemoryListener l)
type - The type we are interested inl - The MemoryListener to pass qualifying updates down to
RescueConstants.TYPE_CIVILIAN,
RescueConstants.TYPE_FIRE_BRIGADE,
RescueConstants.TYPE_AMBULANCE_TEAM,
RescueConstants.TYPE_POLICE_FORCE,
RescueConstants.TYPE_ROAD,
RescueConstants.TYPE_NODE,
RescueConstants.TYPE_RIVER,
RescueConstants.TYPE_RIVER_NODE,
RescueConstants.TYPE_BUILDING,
RescueConstants.TYPE_REFUGE,
RescueConstants.TYPE_FIRE_STATION,
RescueConstants.TYPE_AMBULANCE_CENTER,
RescueConstants.TYPE_POLICE_OFFICE,
RescueConstants.TYPE_WORLD,
RescueConstants.TYPE_CAR
public static MemoryListener createInternalTypeFilter(int type,
MemoryListener l)
type - The internal type we are interested inl - The MemoryListener to pass qualifying updates down to
RescueConstants.INTERNAL_TYPE_CIVILIAN,
RescueConstants.INTERNAL_TYPE_FIRE_BRIGADE,
RescueConstants.INTERNAL_TYPE_AMBULANCE_TEAM,
RescueConstants.INTERNAL_TYPE_POLICE_FORCE,
RescueConstants.INTERNAL_TYPE_CAR,
RescueConstants.INTERNAL_TYPE_BUILDING,
RescueConstants.INTERNAL_TYPE_REFUGE,
RescueConstants.INTERNAL_TYPE_FIRE_STATION,
RescueConstants.INTERNAL_TYPE_POLICE_OFFICE,
RescueConstants.INTERNAL_TYPE_AMBULANCE_CENTER,
RescueConstants.INTERNAL_TYPE_ROAD,
RescueConstants.INTERNAL_TYPE_NODE,
RescueConstants.INTERNAL_TYPE_RIVER,
RescueConstants.INTERNAL_TYPE_RIVER_NODE,
RescueConstants.INTERNAL_TYPE_WORLD,
RescueConstants.INTERNAL_TYPE_ANY_BUILDING,
RescueConstants.INTERNAL_TYPE_ANY_HUMANOID
public void objectAdded(RescueObject o,
int time)
MemoryListener
objectAdded in interface MemoryListenero - The object addedtime - The timestamp of the change
public void objectChanged(RescueObject o,
int property,
int time)
MemoryListener
objectChanged in interface MemoryListenero - The object changedproperty - The property that changedtime - The timestamp of the change
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||