Class FieldAccessingSolutionCloner<Solution_>
- java.lang.Object
- 
- org.optaplanner.core.impl.domain.solution.cloner.FieldAccessingSolutionCloner<Solution_>
 
- 
- Type Parameters:
- Solution_- the solution type, the class with the- PlanningSolutionannotation
 - All Implemented Interfaces:
- SolutionCloner<Solution_>
 
 public class FieldAccessingSolutionCloner<Solution_> extends Object implements SolutionCloner<Solution_> 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classFieldAccessingSolutionCloner.FieldAccessingSolutionClonerRunprotected static classFieldAccessingSolutionCloner.Unprocessed
 - 
Field SummaryFields Modifier and Type Field Description protected ConcurrentMap<Class<?>,Constructor<?>>constructorMemoizationprotected DeepCloningUtilsdeepCloningUtilsprotected ConcurrentMap<Class<?>,List<Field>>fieldListMemoizationprotected SolutionDescriptor<Solution_>solutionDescriptor
 - 
Constructor SummaryConstructors Constructor Description FieldAccessingSolutionCloner(SolutionDescriptor<Solution_> solutionDescriptor)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Solution_cloneSolution(Solution_ originalSolution)Does a planning clone.protected booleanisClassDeepCloned(Class<?> type)protected <C> Constructor<C>retrieveCachedConstructor(Class<C> clazz)This method is thread-safe.protected <C> List<Field>retrieveCachedFields(Class<C> clazz)This method is thread-safe.
 
- 
- 
- 
Field Detail- 
solutionDescriptorprotected final SolutionDescriptor<Solution_> solutionDescriptor 
 - 
constructorMemoizationprotected final ConcurrentMap<Class<?>,Constructor<?>> constructorMemoization 
 - 
fieldListMemoizationprotected final ConcurrentMap<Class<?>,List<Field>> fieldListMemoization 
 - 
deepCloningUtilsprotected final DeepCloningUtils deepCloningUtils 
 
- 
 - 
Constructor Detail- 
FieldAccessingSolutionClonerpublic FieldAccessingSolutionCloner(SolutionDescriptor<Solution_> solutionDescriptor) 
 
- 
 - 
Method Detail- 
cloneSolutionpublic Solution_ cloneSolution(Solution_ originalSolution) Description copied from interface:SolutionClonerDoes a planning clone. The returnedPlanningSolutionclone must fulfill these requirements:- The clone must represent the same planning problem.
 Usually it reuses the same instances of the problem facts and problem fact collections as the original.
- The clone must have the same (equal) score as the original.
- The clone must use different, cloned instances of the entities and entity collections.
 If a cloned entity changes, the original must remain unchanged.
 If an entity is added or removed in a cloned PlanningSolution, the originalPlanningSolutionmust remain unchanged.
 This method is thread-safe. - Specified by:
- cloneSolutionin interface- SolutionCloner<Solution_>
- Parameters:
- originalSolution- never null, the original- PlanningSolution
- Returns:
- never null, the cloned PlanningSolution
 
- The clone must represent the same planning problem.
 Usually it reuses the same instances of the problem facts and problem fact collections as the 
 - 
retrieveCachedConstructorprotected <C> Constructor<C> retrieveCachedConstructor(Class<C> clazz) This method is thread-safe.- Type Parameters:
- C- type
- Parameters:
- clazz- never null
- Returns:
- never null
 
 - 
retrieveCachedFieldsprotected <C> List<Field> retrieveCachedFields(Class<C> clazz) This method is thread-safe.- Type Parameters:
- C- type
- Parameters:
- clazz- never null
- Returns:
- never null
 
 - 
isClassDeepClonedprotected boolean isClassDeepCloned(Class<?> type) 
 
- 
 
-