Package repast.simphony.engine.watcher
Annotation Type Watch
-
@Retention(RUNTIME) @Target(METHOD) public @interface Watch
Annotation for creating a watcher.- Version:
- $Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
- Author:
- Nick Collier
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description String
watcheeClassName
The fully qualified class name of the watchee..String
watcheeFieldNames
A comma separated list of the field names to watch in the watchee class.WatcherTriggerSchedule
whenToTrigger
Gets when to trigger the watch: immediately or later.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
id
Identifier for this Watch.int
pick
The number of watchers to be triggered.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.double
scheduleTriggerDelta
Defaults to 1double
scheduleTriggerPriority
Defaults to ScheduleParameters.RANDOM_PRIORITYboolean
shuffle
Gets whether or not the list of watchers to be triggered is shuffled prior to triggering.String
triggerCondition
The trigger condition for triggering the method on which this is an annotation.
-
-
-
Element Detail
-
watcheeClassName
String watcheeClassName
The fully qualified class name of the watchee..
-
-
-
watcheeFieldNames
String watcheeFieldNames
A comma separated list of the field names to watch in the watchee class.
-
-
-
whenToTrigger
WatcherTriggerSchedule whenToTrigger
Gets when to trigger the watch: immediately or later.- Returns:
- Gets when to trigger the watch: immediately or later.
-
-
-
id
String id
Identifier 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 triggerCondition
The 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:
- ""
-
-