OptaPlanner core 6.2.0.Beta1

org.optaplanner.core.api.domain.solution.cloner
Annotation Type DeepPlanningClone


@Target(value={TYPE,METHOD})
@Inherited
@Retention(value=RUNTIME)
public @interface DeepPlanningClone

Marks a problem fact class as being required to be deep planning cloned. Not needed for a Solution or PlanningEntity because those are automatically deep cloned.

It can also mark a property (getter for a field) as being required to be deep planning cloned. This is especially useful for Collection (or Map) properties. Not needed for a Collection (or Map) property with a generic type of PlanningEntity or a class with a DeepPlanningClone annotation, because those are automatically deep cloned. Note: If it annotates a property (getter method for a field) returning Collection (or Map), it clones the Collection (or Map), but its elements (or keys and values) are only cloned if they are of a type that needs to be planning cloned.

This annotation is ignored if a custom SolutionCloner is set with PlanningSolution.solutionCloner() or if the Solution implements PlanningCloneable.


OptaPlanner core 6.2.0.Beta1

Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.