Annotation Interface NullInitialised
Marks a field as a current-period value that should be set to
null at the start
of each simulation time interval.
Use this annotation on fields whose values are computed fresh within the current period
and must not carry over from the previous period. When
UpdateManager.applyAnnotations(Object) is called, all @NullInitialised
fields are cleared after all Lag assignments have been applied, so a field
annotated with both will end up null.
This annotation is only valid on fields of reference (non-primitive) type. Applying it
to a primitive field will cause UpdateManager to throw an
IllegalArgumentException.
Example:
// Computed each period during LabourMarketAndIncomeUpdate; must be null at period start.
@NullInitialised
private Labour labourSupplyWeekly;
- See Also: