Package repast.simphony.engine.watcher
Annotation Interface Watch
Annotation for creating a watcher.
- Version:
- $Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
- Author:
- Nick Collier
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionThe fully qualified class name of the watchee..A comma separated list of the field names to watch in the watchee class.Gets when to trigger the watch: immediately or later. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionIdentifier for this Watch.int
The number of watchers to be triggered.colocated - true if the watcher and the watchee are in the same context. linked_to ['network name'] - true if the watcher is linked to the watchee in any network, or optionally in the named network linked_from ['network name'] - true if the watcher is linked from the watchee in any network, or optionally in the named network within X ['network name'] - true if the path from the watcher to the watchee is less than or equal to X where X is a double precision number.double
Defaults to 1double
Defaults to ScheduleParameters.RANDOM_PRIORITYboolean
Gets whether or not the list of watchers to be triggered is shuffled prior to triggering.The trigger condition for triggering the method on which this is an annotation.
-
Element Details
-
watcheeClassName
String watcheeClassNameThe fully qualified class name of the watchee.. -
watcheeFieldNames
String watcheeFieldNamesA comma separated list of the field names to watch in the watchee class. -
whenToTrigger
WatcherTriggerSchedule whenToTriggerGets when to trigger the watch: immediately or later.- Returns:
- Gets when to trigger the watch: immediately or later.
-
-
-
id
String idIdentifier for this Watch.- Default:
- ""
-
query
String query- colocated - true if the watcher and the watchee are in the same context.
- linked_to ['network name'] - true if the watcher is linked to the watchee in any network, or optionally in the named network
- linked_from ['network name'] - true if the watcher is linked from the watchee in any network, or optionally in the named network
- within X ['network name'] - true if the path from the watcher to the watchee is less than or equal to X where X is a double precision number. This is either for any network in the context or in the named network.
- within_vn X ['grid name'] - true if the watchee is in the watcher's von neumann neighborhood in any grid projection or in the named grid. X is the extent of the neighborhood in the x, y, [z] dimensions.
- within_moore X ['grid name'] - true if the watchee is in the watcher's moore neighborhood in any grid projection or in the named grid. X is the extent of the neighborhood in the x, y, [z] dimensions.
- within X ['geography name'] - true if the orthodromic distance from the watcher to the watchee is less than or equal to X meters, otherwise false.
- Default:
- ""
-
triggerCondition
String triggerConditionThe trigger condition for triggering the method on which this is an annotation. The trigger condition is some arbitary boolean expression. The following variables are available to the expression $watcher, $watchee, and $context. These correspond to the watcher, watchee and context. Methods can be called on these variables. For example, $watcher.getAge() > 3, will call getAge on the watcher. The operators && and || are also supported. For example, $watcher.getAge() > 3 && watcher.getAge() > $watchee.getAge()- Default:
- ""
-
scheduleTriggerDelta
double scheduleTriggerDeltaDefaults to 1- Default:
- 1.0
-
scheduleTriggerPriority
double scheduleTriggerPriorityDefaults to ScheduleParameters.RANDOM_PRIORITY- Default:
- 0.0/0.0
-
pick
int pickThe number of watchers to be triggered. The default is all watchers.- Returns:
- The number of watchers to be triggered.
- Default:
- 2147483647
-
shuffle
boolean shuffleGets whether or not the list of watchers to be triggered is shuffled prior to triggering. The default is true.- Returns:
- whether or not the list of watchers to be triggered is shuffled prior to triggering.
- Default:
- true
-