This is a example, when the override codes are automatically generated with the IDE.
public class MCDPSolution extends Solution{
....
@Override
public Solution copy() {
// TODO Auto-generated method stub
return null;
}
Output:
New minor check:
@SuppressWarnings("unchecked")
static public <T extends Solution> T checkedCopy(T solution){
// copy solution
Solution copy = solution.copy();
if (copy == null)
{
throw new SolutionCopyException("\nDeep copy of solution of type " + solution.getClass().getSimpleName() + " failed. "
+ "Calling copy() yields a solution with return null.\n"
+ "- Expected cause of this type mismatch:\n"
+ solution.getClass().getSimpleName() + " does not completly implement method copy().");
}
Class<?> origClass = solution.getClass();
Class<?> copyClass = copy.getClass();
...
Hi,
In this file: https://github.com/hdbeukel/james-core/blob/master/src/main/java/org/jamesframework/core/problems/sol/Solution.java
Problem for new users:
This is a example, when the override codes are automatically generated with the IDE.
Output:
New minor check:
New output:
Regards