I'm debugging the TaskAssigning sample to Sundstrand some behavior. But I don't understand one thing.
During startup all employee in task object are null. When start solving the getEmployee of Task is called and employee field is != null. But the setEmployee is never called! I commented the set and the project still works. How can OptaPlanner set the employee without using the set method.
Thanks, S.
This is more a Java question than an OptaPlanner question. Java supports reflection, through which user code can access pretty much anything (under some circumstances). OptaPlanner (and Timefold) use reflection to read and write fields; even though it does support going through getters and setters, it can also avoid them completely.