org.optaplanner.core.api.solver.event
Class BestSolutionChangedEvent
java.lang.Object
java.util.EventObject
org.optaplanner.core.api.solver.event.BestSolutionChangedEvent
- All Implemented Interfaces:
- Serializable
public class BestSolutionChangedEvent
- extends EventObject
Delivered when the best Solution
changes during solving.
Delivered in the solver thread (which is the thread that calls Solver.solve()
.
- See Also:
- Serialized Form
BestSolutionChangedEvent
public BestSolutionChangedEvent(Solver source,
long timeMillisSpent,
Solution newBestSolution)
- Parameters:
source
- never nulltimeMillisSpent
- >= 0LnewBestSolution
- never null
getTimeMillisSpent
public long getTimeMillisSpent()
- Returns:
- >= 0, the amount of millis spent since the
Solver
started
until getNewBestSolution()
was found
getNewBestSolution
public Solution getNewBestSolution()
- Returns:
- never null
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.