Annotation Interface ProblemFactCollectionProperty


@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface ProblemFactCollectionProperty
Specifies that a property (or a field) on a PlanningSolution class is a Collection of problem facts. A problem fact must not change during solving (except through a ProblemChange event).

The constraints in a ConstraintProvider rely on problem facts for ConstraintFactory.forEach(Class).

Do not annotate planning entities as problem facts: they are automatically available as facts for ConstraintFactory.forEach(Class).

For solver reproducibility, the collection must have a deterministic, stable iteration order. It is recommended to use a List, LinkedHashSet or SortedSet.

See Also: